2017 © Pedro Peláez
 

library laryr

Helps Laravel users to add routes easily.

image

siokas/laryr

Helps Laravel users to add routes easily.

  • Thursday, August 4, 2016
  • by siokas
  • Repository
  • 2 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 11 % Grown

The README.md

Laryr (Laravel Yaml Routes)

Latest Stable Version StyleCI Codacy Badge GitHub license, (*1)

This package helps Laravel users to add routes easily. There will be a yaml on your project in which you have the option to specify the routes. Currently the package provides functionality for simple routes and group routes. The plan for a future update is to include more complex routes with where statements., (*2)

The package supports functionality for: - Routes with all methods (get, post, put, patch, delete, resource) - Route Name - Middleware - (new) Route Groups, (*3)

Note: Tested and works fine on Laravel 5.3, (*4)

Install

Via Composer, (*5)

``` bash composer require siokas/laryr, (*6)


After the installation you should regirster the ServiceProvider to the config/app.php file. Add the following line in the __providers__ array. ``` php Siokas\Laryr\LaryrServiceProvider::class,

Now you should publish the unpublished files. Open terminal and type:, (*7)

``` bash php artisan vendor:publish, (*8)


This command will publish a yaml file at the root directory of your app, called __routes.yml__ and a configuration file in config directory called __laryr.php__. ## Usage Open the __routes.yml__ file and enter your application routes in a collection type. ``` yml - route: test method: get controller: AppController function: index

This will create a route which points to the specified Controller and function., (*9)

Note 1: If you want to change the name and the path of the routes.yml file, you have to specify the new path and filename in the config/laryr.php file., (*10)

Note 2: Nested functions are not supported on the yaml file., (*11)

To create a route group you have to add a route with method as group and name your route., (*12)

``` yml

method: group name: groupRoutes, (*13)


Then you have to create a .yml file in the same directory with the __routes.yml__ file. This file has to have the same name that you spesified in the previous step. To create that file, open the terminal and type the make artisan command: ``` bash php artisan make:yaml groupRoutes

In this file you can specify the routes you want in the same way., (*14)

Options

There are two options in the routes which are listed below:, (*15)

``` yml name: routeName middleware: auth, (*16)


For the route groups there are more available options to specify: ``` yml name: test domain: {account}.app.dev prefix: user namespace: UsersAccount

Tutorial

The following link contains a nice fully tutorial on how to use the package to your project: https://www.siokas.com/post/laryr/, (*17)

Libraries

License

The MIT License (MIT). Please see License File for more information., (*18)

The Versions

04/08 2016

dev-master

9999999-dev https://github.com/siokas/Laryr

Helps Laravel users to add routes easily.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel yaml routes siokas laryr

04/08 2016

0.4

0.4.0.0 https://github.com/siokas/Laryr

Helps Laravel users to add routes easily.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel yaml routes siokas laryr

04/08 2016

0.3

0.3.0.0 https://github.com/siokas/Laryr

Helps Laravel users to add routes easily.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel yaml routes siokas laryr

02/08 2016

0.2

0.2.0.0 https://github.com/siokas/Laryr

Helps Laravel users to add routes easily.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel yaml routes siokas laryr

02/08 2016

0.1

0.1.0.0 https://github.com/siokas/Laryr

Helps Laravel users to add routes easily.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel yaml routes siokas laryr