PHP code example of xety / cake3-sluggable

1. Go to this page and download the library: Download xety/cake3-sluggable 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/ */

    

xety / cake3-sluggable example snippets

 php
"ty/cake3-sluggable": "1.*"
},
 php
Plugin::load('Xety/Cake3Sluggable');
 php
$this->addBehavior('Xety/Cake3Sluggable.Sluggable');
 php
$this->Users
	->find('slug', [
		'slug' => 'your-slug-here',
		'slugField' => 'Users.slug'
	]);
 php
	$this->addBehavior('Xety/Cake3Sluggable.Sluggable', [
			'field' => 'username'
		]
	);
	
 php
	$this->addBehavior('Xety/Cake3Sluggable.Sluggable', [
			'field' => 'username',
			'slug' => 'slug_username'
		]
	);
	
 php
	$this->addBehavior('Xety/Cake3Sluggable.Sluggable', [
			'replacement' => '_'
		]
	);