shah/laravel-unique-slug-generator

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

This package is auto-updated.

Last update: 2024-02-19 08:24:20 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