Download the PHP package paxha/laravel-sluggable without Composer
On this page you can find all versions of the php package paxha/laravel-sluggable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download paxha/laravel-sluggable
More information about paxha/laravel-sluggable
Files in paxha/laravel-sluggable
Download paxha/laravel-sluggable
More information about paxha/laravel-sluggable
Files in paxha/laravel-sluggable
Vendor paxha
Package laravel-sluggable
Short Description This package provides an event that will generate a unique slug when saving or creating any Eloquent model.
License MIT
Package laravel-sluggable
Short Description This package provides an event that will generate a unique slug when saving or creating any Eloquent model.
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-sluggable
Laravel Slug Generator
Introduction
This package provides an event that will generate a unique slug when saving or creating any Eloquent model.
Installation
composer require paxha/laravel-sluggable
Usage
- Getting Started
- Examples
Getting Started
Consider the following table schema for hierarchical data:
Use the Sluggable
trait in your model to work with slug:
By default, the trait expects three things
- slugFrom(): array (optional) if you using
name
column - slugSaveTo(): string (optional) if you using
slug
column - separator(): string (optional) default
-
You can overriding it as well slugFrom()
, slugSaveTo()
and separator()
:
Examples
Example A
Database
Model
Create User
Output
Example B
Table
Model
Create User
Output
License
This is open-sourced laravel library licensed under the MIT license.
All versions of laravel-sluggable with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.2|^8.0
The package paxha/laravel-sluggable contains the following files
Loading the files please wait ....