-
app/Package.php
Open in GitHubuse Illuminate\Database\Eloquent\Model; class Package extends Model { public function getComposerVendorAttribute() { return Str::before($this->composer_name, '/'); } }
-
app/Http/Controllers/PackageController.php
Open in GitHubuse App\Package; class PackageController extends Controller { public function showId(Package $package) { return redirect()->route('packages.show', [ 'namespace' => $package->composer_vendor, 'name' => $package->composer_package, ]); } }
-
resources/views/collaborators/package-card.blade.php
Open in GitHub<div class="m-1 p-6 my-3 border-grey border rounded shadow "> <div class="flex mb-2"> <div class="flex-1"> <a class="text-indigo-600 text-xl no-underline font-bold hover:underline" href="{{ route('packages.show', [$package->composer_vendor, $package->composer_package]) }}">{{ $package->name }}</a> </div> </div> </div>