shah/laravel-unique-slug-generator

dev-master 2023-09-19 07:29 UTC

This package is auto-updated.

Last update: 2024-10-19 09:39:47 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

Help Link