Laravel Community Tools by Tighten

Category "Form" tricks

47 tricks
Laravel in create common function
Darshan Ma... 9 years ago 7053
Append array in $request::all() while saving data in laravel 5.2
mlselegant 9 years ago 10008
Simple ACL laravel 5.2 Providers->AuthServiceProvider Register any application authentication / authorization services.
hendrilara 10 years ago 32191
Often you have a form in your application that has a file input (logo, picture, etc...) and you would like to test it. You might have been stuck when trying to test that form, puzzled at the odd errors you got while you did used the attach() method provided in the Laravel Integrated test package. I will show you how to smoothly send a file to your server when you run your PHPUnit test suite.
MehdiSouih... 10 years ago 13149
When user clicks on "delete" button, open a confirmation box before deleting an item.
ismaeltoe 10 years ago 46630
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 58153
5.0
You can use this when you want to add a placeholder to your Form::selectRange or Form::selectMonth.
soffan 11 years ago 11415
I use this to always know in my controllers if the current action is shown through a Facebook tab iframe. Upon the first request this checks if there is a "signed_request" variable posted to the page. Then $fb_state is set to true and shared with all views. The problem is that on navigating to the next page within your app this variable is lost and you don't know if this is shown through facebook. Due to the FB page proxy you can't use sessions to remember this for the next request either. I solve this problem with adding "signed_request" as a parameter (i.e. "&signed_request=123ljshgljsdhflsdhfl") to every link and form when $fb_state == true. Of course you could also pass any other variable if you don't need the actual signed_request data.
flei 11 years ago 8349
Sub Form, Cascade Form, Form Inside Form
sayasuhend... 11 years ago 9238