Laravel Community Tools by Tighten

Recent tricks

459 tricks
sending variable values to your multiple controller and accessing them in your blade template
wasiqaftab 11 years ago 9850
Pagination with dots in laravel
wallacemax... 11 years ago 10023
There is easy way to update relation model without query for related model.
monaye 11 years ago 13580
The easy way to define Eloquent Global Scopes with https://github.com/jarektkaczyk/laravel-global-scope
jarektkacz... 11 years ago 8328
Get results in a table when there are no results for the relationship
wallacemax... 11 years ago 20409
There are many tricks to return the response in `json`. Actually, if the returned value is an array or instance of "arrayableinterface" or "jsonableinterface" such as eloquent model, you could just return it, it'll be a json, magically. There are following three way i have noticed performance :) Thanks. #KeepSharing
pratikbuta... 11 years ago 9282
While returning of date field in JSON, I found some unexpected output which i have posted on stackoverflow. You can see here for more information: http://stackoverflow.com/q/31184170/1318946
pratikbuta... 11 years ago 8963
Get the base URL of your Laravel 5 app page available anywhere in your JavaScript for jQuery to use. To do this you could have the following code in your template.blade.php file...
cpaddison 11 years ago 32596
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... 11 years ago 88331