Looking to hire Laravel developers? Try LaraJobs

laravel-route maintained by zepfietje

Description
Custom Laravel Route class which adds some convenient behavior.
Author
Last update
2020/11/30 13:54 (dev-master)
License
Downloads
210
Tags

Comments
comments powered by Disqus

Packagist Version Packagist Downloads Starware

Laravel Route

This package extends the default Laravel Route class and adds some convenient behavior.

Installation

  1. Install this package.
    $ composer require zepfietje/laravel-route
    
  2. Import the Route class of this package in your routes file instead of the default one.
    - use Illuminate\Support\Facades\Route;
    + use ZepFietje\Route\Route;
    

Usage

view()

All bound parameters are automatically passed to the view.
To make this work with route model binding, be sure to register an explicit binding.

Before:

Route::get('users/{user}', function (User $user) {
    return view('users.show', ['user' => $user]);
});

After:

Route::view('users/{user}', 'users.show');

Starware

Laravel Route is Starware.
This means you're free to use the project, as long as you star its GitHub repository.
Your appreciation makes us grow and glow up. ⭐