islomiddin-dev / unique-slug-generator
Unique slug generator for Laravel framework. supports soft delete and hard delete
v1.0.4
2023-04-13 05:12 UTC
README
Recommended
- PHP 8.0 +
- Laravel 9.0 +
Installation
Composer
composer require islomiddin-dev/unique-slug-generator
Please add this provider to the list of providers in your config/app.php file.
IslomiddinDev\Providers\HelperServiceProvider::class,
Example
slug(modelClass: Post::class, attribute: 'title', name: $request->title);
Output
//name: Unique Slug Generator //output: unique-slug-generator //name: Unique Slug Generator //output: unique-slug-generator-1
- modelClass: Model class name
- attribute: Model attribute name
- name: Model attribute value