8000 GitHub - zepfietje/laravel-route: Custom Laravel Route class which adds some convenient behavior.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 10, 2022. It is now read-only.
/ laravel-route Public archive

Custom Laravel Route class which adds some convenient behavior.

License

Notifications You must be signed in to change notification settings

zepfietje/laravel-route

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. ⭐

About

Custom Laravel Route class which adds some convenient behavior.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages

0