Laravel Community Tools by Tighten

Category "Routing" tricks

91 tricks
with this code you can test all get page without params (index,create,etc...)
d3v2a 10 years ago 14686
You can see SQL Query of your DB table on Laravel App, by Event listener.
ahaneef29 10 years ago 8267
I'm having a porblem trying to solve this error.. anyone encountered this beforre?
dnates2014 10 years ago 7187
symply dont register unessecary route you dont have to use facade, $router instance is set by the function in route provider with config cached and files compiled i get app booted in ~30ms vs ~50 on my dev server
d3v2a 10 years ago 8893
5.0
Session time out for logged in user (middleware way) for prevent dashboard or ... access after specify time. if we use this middleware in route groups, it will be run on every request under route group. with this code we do not need to change php.ini file or laravel session config file and default settings are appropriate. Do not forget to register middleware in app\Http\Kernel : 'timeout' => 'App\Http\Middleware\SessionTimeout', Other notices: 1- we can use middleware paramaters in laravel 5.1 for custom conditions. 2- we must redirect user back (after session timeout and log out ), to prevent user navigate to come back. 3- we must show a message to user (after session timeout and log out), that you logged out after [20] minutes that you were not active. Our Persian web app for time management is: https://timenix.com If you have a better idea please comment it. ♥
ivahidmont... 10 years ago 87708
Helper function to mass-map routes to methods. I use this setup in development to quickly map all "test/*" routes to a Test controller, to test out arbitrary PHP code. Updated version also supports DI in controller methods. Updated to correctly fill optional arguments.
davestewar... 10 years ago 12587
5.0
example of how to test API with Codeception and Laravel
Mahmoudz 10 years ago 10659
5.0
Playing with Laravel Lumen: simple RESTful trait.
beanmoss 10 years ago 8209
I was looking for a way to remove one of my middlewares in testing. I could not find it, so I wrote a simple function to do it. Put the following function in your 'TestCase.php'
moon0326 10 years ago 9211