Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 1.97 KB

README.md

File metadata and controls

75 lines (52 loc) · 1.97 KB

Laravel Bangla Slug Package

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