Laravel Community Tools by Tighten

Recent tricks

459 tricks
CSRF is enabled by default on all Routes in Laravel 5, you can disable it for specific routes by modifying app/Http/Middleware/VerifyCsrfToken.php
aglipanci 11 years ago 38658
For the official Laravel (4, 5) documentation website. Github: https://github.com/Webaty/Awesome-Laravel-documentation-bookmarklet - Features: 1. AJAX Pagination. 2. All external links open up in a new window. 3. Browser (back and forward). 4. Left sidebar fixed position with scrollbar. - Usage: 1. Open your browser. 2. Create a new bookmark. 3. Set the bookmarklet name and paste the code below as the URL. 4. Open http://laravel.com/docs/ then click on the new bookmarklet.
aymangado 11 years ago 11838
Let's talk about date validation and how theses 4 rules works, as their behaviour is even more awesome than documented. What is know : - date, before and after uses strtotime PHP native function. - date_format uses date_parse_from_format PHP native function But how do we validate a date after today in a custom format ? And what to do to compare two form fields ? What is not documented is that before and after rules check if a date_format rule exists, and will use this format if needed. Example: I have french formated dates (31/01/2015), and two fields, start_date and end_date. start_date must be after tomorrow, and end_date after start_date
Lelectrolu... 11 years ago 58592
5.0
In this example I use Monolog for logging user activity in my cms admin. Usage: add the following line to the controller's constructor: UserLog::write();
subdesign 11 years ago 34268
4.2
Change email configuration on the fly.
aglipanci 11 years ago 16364
4.2
Temporarily log in as another user, but switch back to the original user at any time. Inspired by the User Switching plugin for WordPress. I use this for testing data being shown based on user role.
dawiyo 11 years ago 18761
When you use union to combine queries, get results and order them or apply limit : it doesn't work as expect. Check the code below
rajivseela... 11 years ago 30237
4.1
Add New Colum To Exist Table With Seeder
faizalprib... 11 years ago 9091
4.0
When validating data belonging to multiple models you might be missing errors if you run your validators one by one. This simple trick combines validators and their errors.
The Saint... 11 years ago 16841
4.2