PHP code example of aakashk-ctpl / laravel-slug

1. Go to this page and download the library: Download aakashk-ctpl/laravel-slug library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aakashk-ctpl / laravel-slug example snippets


Slug::make('Online Exam Portal');
// online-exam-portal

Slug::make('Laravel Package Development', '_');
// laravel_package_development

use Ctpl\LaravelSlug\Facades\Slug;

Slug::make('Online Exam Portal');
// online-exam-portal

Slug::make('Laravel Package Development');
// laravel-package-development

use Ctpl\LaravelSlug\SlugGenerator;

app(SlugGenerator::class)->make('Online Exam Portal');
// online-exam-portal

Slug::make('Laravel Package Development', '_');
// laravel_package_development

return [
    'default_separator' => '-',
];
bash
php artisan vendor:publish --tag=slug-config