sohibd/laravelslug

make easy bangla and english slug with utf-8 standard format

v1.0.1 2022-08-15 09:28 UTC

This package is auto-updated.

Last update: 2024-10-09 23:53:28 UTC


README

Latest Version GitHub issues GitHub forks GitHub stars

Installation

  1. Install the package via Composer:

    $ composer require sohibd/laravelslug

    The package will automatically register its service provider.

  2. Optionally, publish the configuration file if you want to change any defaults:

    php artisan vendor:publish --provider="Sohibd\Laravelslug\SlugServiceProvider"
  3. Updating your Controllers

namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Sohibd\Laravelslug\Generate;
use App\Http\Controllers\Controller;

class YourController extends Controller
{
   public function store(Request $request){
   
    YourModel::Create([
        'title'=>$request->title,
        //for bangla or other language
        'slug'=> Generate::Slug($request->title),
      //for specific Language 
        'slug'=> Generate::Enslug($request->title),
        //or Bangla

          //or Arabic
         'slug'=> Generate::Abslug($request->title),

        'slug'=> Generate::Bnslug($request->title),
       
       //or Hindi 
        'slug'=> Generate::Hnslug($request->title),

      
         //or Urdu
         'slug'=> Generate::Udslug($request->title),
    ]);
     
    }   

}

#development Some site with this package

https://www.sohibd.com
https://www.bikebd.com

4 Test

php artisan serve

http://127.0.0.1:8000/makesulg