Skip to content

zahidul1994/laravelslug-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

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

About

First Create Laravel Package Form SohiBD Package

Resources

Stars

Watchers

Forks

Packages

No packages published