Skip to content

Instantly share code, notes, and snippets.

@imliam imliam/web.php
Created Mar 20, 2017

Embed
What would you like to do?
Laravel 5 - Route must start with @
<?php
/*
|--------------------------------------------------------------------------
| Laravel 5 - Route must start with @
|--------------------------------------------------------------------------
|
| A quick snippet showing use of the Route::where(); method that lets you
| define a regex pattern for the route to match, such as the "@" symbol
| at the beginning to denote a user.
|
*/
Route::get('/users/{user}', 'UserController@index')->where('user', '^@.*');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.