Laravel Community Tools by Tighten

Recent tricks

458 tricks
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 11629
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 58183
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 33795
4.2
Change email configuration on the fly.
aglipanci 11 years ago 16072
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 18502
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 29933
4.1
Add New Colum To Exist Table With Seeder
faizalprib... 11 years ago 8851
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 16613
4.2
If you are using the same template in a lot of places and might later need an easy way to switch out the template for a different one without having to go through all views that implement it or replacing the current template, then consider using a constant to pass this parameter. Doing this will allow you to switch out your template for any other template at any time in nearly no time at all.
The Saint... 11 years ago 8464