luminark/url

Luminark URL package.
11
Install
composer require luminark/url
Latest Version:0.5.0
License:MIT
Last Updated:Dec 30, 2015
Links: GitHub  ·  Packagist
Maintainer: mvrkljan

#Luminark URL Package

Build Status Code Coverage SensioLabsInsight Scrutinizer

##Installation

composer require luminark/url

Add service provider to your config/app.php:

Luminark/Url/UrlServiceProvider::class,

##Resource Model

Have the Eloquent model URLs will be pointing to use the Luminark/Url/Traits/HasUrlTrait trait and implement the Luminark/Url/Interfaces/HasUrlInterface interface.

##Resource Controller

The controller which will be handling URLs needs to use the Luminark/Url/Traits/HandlesUrlTrait trait and extend the getUrlResourceResponse(Url $url) method which receives the requested Url model.

In your routes.php (at the bottom) add a wildcard route handler which uses getUrlResource method. E.g.:

Route::get('{uri?}', ['uses' => 'UrlController@getUrlResource'])->where('uri', '.*');

Related Packages

luminark/serializable-values

Luminark Serializable Values package.

74 0
hootlex/laravel-friendships

This package gives Eloquent models the ability to manage their friendships.

121,081 699
spatie/laravel-sluggable

Generate slugs when saving Eloquent models

13,685,183 1,556
kodeine/laravel-acl

Light-weight role-based permissions for Laravel 5 built in Auth system.

362,391 776