Download the PHP package jetcod/laravel-slugify without Composer

On this page you can find all versions of the php package jetcod/laravel-slugify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-slugify

Laravel Slugify Package

Build

Latest Stable Version Total Downloads License

Overview

The jetcod\laravel-slugify package simplifies the generation and management of slugs for Eloquent models in Laravel applications. This package utilizes the HasSlug trait to automatically create and update slugs based on your model's attributes, with flexible configuration options.

Installation

Requirements

Step 1: Install via Composer

To install the package, run the following command:

Step 2: Configure your model

In any model where you want to use the slugging functionality, use the HasSlug trait and implement getSlugConfig() method to configure the slug options.

Usage

Setting Up the Sluggable Model

To start using slugs in your model, follow these steps:

Here’s an example:

Available Configuration Options

Note: Calling slugColumn() is required while defining the slug options.

Example: Creating and Updating a Model with Slug Generation

When you create or update a model with HasSlug configured, the slug is automatically generated and saved according to the options you've specified.

Example: Generating Unique Slugs

To ensure unique slugs, you can use the avoidDuplicates() method in your SlugOptions:

Then when you create or update a model, the slug will be generated and saved as a unique value.

Note: It also considers the maximum length of the slug while generating unique slug strings.

Testing

Run your tests to verify that slugs are generated as expected:

Run code coverage analysis to generate a coverage report. This will generate a coverage report in the coverage directory.

Run PHPStan to check for potential issues in the code:

License

This package is open-source software licensed under the MIT License.


All versions of laravel-slugify with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0
jetcod/data-transport Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jetcod/laravel-slugify contains the following files

Loading the files please wait ....