Skip to content

Instantly share code, notes, and snippets.

@cursosdesarrolloweb
Created August 10, 2021 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cursosdesarrolloweb/79df1777062d355d46936942cbc71dd4 to your computer and use it in GitHub Desktop.
Save cursosdesarrolloweb/79df1777062d355d46936942cbc71dd4 to your computer and use it in GitHub Desktop.
<?php
namespace App\Models;
use Cviebrock\EloquentSluggable\Sluggable;
use Illuminate\Database\Eloquent\Model;
class Project extends Model
{
use Sluggable;
/**
* @return array
*/
public function sluggable(): array {
return [
'slug' => [
'source' => 'name'
]
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment