PHP code example of fx / laravel-slug
1. Go to this page and download the library: Download fx/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/ */
fx / laravel-slug example snippets
// routes/web.php
use Fx\Slug\Contacts\FxSlug;
Route::get('/', function (FxSlug $slug) {
dd($slug->slug('我爱我的祖国')); // i-love-my-country
});