for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Models;
use App\Traits\Sluggable;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
use Sluggable;
public function posts()
return $this->hasMany(Post::class);
}
public function getUrlAttribute()
return route('categories.show', $this->slug);