LaravelPackages.net
Acme Inc.
Toggle sidebar
akrillia/laravel-permalinks

9
0
0.0.5
About akrillia/laravel-permalinks

akrillia/laravel-permalinks is a Laravel package. It currently has 0 GitHub stars and 9 downloads on Packagist (latest version 0.0.5). Install it with composer require akrillia/laravel-permalinks. Discover more Laravel packages by akrillia or browse all Laravel packages to compare alternatives.

Last updated

Laravel Permalinks Package

assets/banner.png

This package allows you to easily create permalinks for your Laravel application.

Installation

To install the package, simply run the following command in your terminal:

composer require akrillia/laravel-permalinks

Then, add the service provider to the providers array in your config/app.php file:

AkrilliA\LaravelPermalinks\LaravelPermalinksServiceProvider::class

Usage

To create a permalink, you first need to generate a slug and then create the permalink link.

Generate a slug

$slug = GenerateSlug::execute($name);
$permalink = Permalink::create($url, $slug);

Alternatively you can call, which will automatically create a slug based on the URL.

$permalink = Permalink::create($url);

This will return an instance of Permalink.

Configuration

You can configure the package by publishing the config file using the following command:

php artisan vendor:publish --provider="AkrilliA\LaravelPermalinks\LaravelPermalinksServiceProvider"

This will create a permalinks.php file in your config directory. You can modify the settings in this file to suit your needs.

License

This package is open-source software licensed under the ISC.

Support

If you need any help, please contact me on my email or open an issue on GitHub.

Comments