shah / laravel-unique-slug-generator
dev-master
2023-09-19 07:29 UTC
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2024-08-19 09:18:57 UTC
README
Use from Model
- Import first the UniqueSlugFacade facade in model
use Shah\LaravelUniqueSlugGenerator\Facades\UniqueSlugFacade; public static function slug_generator($title = null){ return ShahUniqSlug::unique_slug_generate(model::class', $title, 'name'); }
Call form controller
$slug = Model::slug_generator($param);
In app.config
add in providers
Shah\LaravelUniqueSlugGenerator\UniqueSlugServiceProvider::class,
add in aliases
'ShahUniqSlug' => Shah\LaravelUniqueSlugGenerator\Facades\UniqueSlugFacade::class