Download the PHP package josezenem/laravel-slugidable without Composer
On this page you can find all versions of the php package josezenem/laravel-slugidable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download josezenem/laravel-slugidable
More information about josezenem/laravel-slugidable
Files in josezenem/laravel-slugidable
Package laravel-slugidable
Short Description A package for Laravel that creates slugs for Eloquent models based on title and ID
License MIT
Homepage https://github.com/josezenem/laravel-slugidable
Informations about the package laravel-slugidable
Slugidable Generate slugs based on title and ID
A package for Laravel that creates slugs for Eloquent models based on both a title and ID
All settings are fully configurable for each model.
Installation
You can install the package via composer:
Usage
Simply Josezenem\Slugidable\Slugidable
trait to your model.
We have included a handy scope method: fromSlugidable() that will extract the ID from the slug and search the model
Configuration
By default we use id, title, slug columns from the model, but you can override these settings by adding the following method to your model.
- slug_from is where the slug will grab the the slug from
- slug_to the place where the slug lives
- using_key_name the ID field used to prefix or suffix the ID
- on could be "prefix" to have the ID before the slug text, or "suffix" to have it after.
- using_separator the seperator to use during slug creation
- force_slug_from force the system to always slug from 'slug_from' regardless if
slug_to
is present
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Jose Jimenez
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-slugidable with dependencies
illuminate/database Version ^8.0|^9.0|^10.0|^11.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0