PHP code example of seeds-std / laravel-slug-rule
1. Go to this page and download the library: Download seeds-std/laravel-slug-rule 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/ */
seeds-std / laravel-slug-rule example snippets
Validator::make(['slug' => 'laravel-5-framework'], ['name' => new \SeedsStd\SlugValidation\Slug()])
->passes(); // true
Validator::make(['slug' => 'laravel_5_framework'], ['name' => new \SeedsStd\SlugValidation\Slug(['separator' => '_'])])
->passes(); // true
return [
'slug' => ':attributeは有効なスラッグを指定してください。',
];