Laravel Community Tools by Tighten

Category "Requests and Input" tricks

68 tricks
Laravel 5.4 Upload Image with Validation example
dave 8 years ago 21426
X-editable allows you to create editable elements on your page. It can be used with any engine (bootstrap, jquery-ui, jquery only) and includes both popup and inline modes. Let's have a quick look at implementing this in Laravel apps.
baqirfaroo... 9 years ago 13115
Create your own request! Before your code run in controller the validation was check the all input. When something wrong, its return redirect back with all error. And you can overwrite the default error messages!
kecsot 9 years ago 6693
This snippet will allow you to add to the request. Tested in Laravel 5.2
wolf 9 years ago 8469
5.0
Append array in $request::all() while saving data in laravel 5.2
mlselegant 9 years ago 9998
Learn how to make a function to easily test which menu items should be marked as active depending on which page you are currently viewing in your browser. Add class of active to bootstrap menu items on different pages. Wherever you need to apply an active class ( or any other class ) in order to make a menu item active depending on which page you are currently viewing, or for any other sort of functionality you might need, this is the way you can do it with Laravel ( or plain PHP just a bit differently ) Watch the video on how to do it https://www.youtube.com/watch?v=E1oit3sd-7k
Novica89 10 years ago 8821
With this trick we add custom queries in the laravel paginator.
Hoosk 10 years ago 6959
Simple ACL laravel 5.2 Providers->AuthServiceProvider Register any application authentication / authorization services.
hendrilara 10 years ago 32182
Bumped into a problem while trying to authorize user against laravel basic auth middleware when testing a REST API through phpunit. I used phpunit call method to send a POST request to API's endpoint which needed users basic HTTP authentication. Every time, laravels basic auth middleware rejected it and I had no idea why, since I've sent proper HTTP Authorization header with phpunit call. Here is the solution ! Or watch it in a video https://www.youtube.com/watch?v=LCrt7jqDsgU Read more on http://laravel.io/forum/03-20-2014-authbasic-fails
Novica89 10 years ago 15955