Laravel Community Tools by Tighten

Tag "5.0" tricks

75 tricks
How to disable any ip from accessing your laravel app? Here is the solution. 1) Create Middleware "IPRestrictMiddleware". 2) Paste the code inside handle function. 3) Register the middleware in kernel function. 4) add the registered middleware in routes in order to restrict the access.
decipher 8 years ago 5359
The array_add function adds a given key / value pair to the array if the given key doesn't already exist in the array.
jobayerfx 8 years ago 5974
5.0
This is a simple solution to create ACL using middleware and role ID. Please follow step by step as shown below. <br> <br>1) create column group_id (int) at users table. <br> <br>2) give value on that column | group_id values: | 1 = Admin | 2 = HR | 3 = Staff 3) create new middleware using php artisan php artisan make:middleware Role 4) Edit the middleware file 5) Edit kernel file and put another line for role class. 6) Set the route and put the role id which allow it to access
laraveltri... 8 years ago 7158
5.0
Remove tags in controller with excepts fields https://gist.github.com/oLDu67/10863c9f51064d1d9390016b28143f85
racibaz 8 years ago 10896
This is how you delete/drop a database using Laravel. If you are not using MySQL you may replace or remove the backtick (`) sign.
harlekoy 8 years ago 10090
This is how you get the list of databases using Laravel.
harlekoy 8 years ago 5747
Laravel Installation, how to laravel latest version
dave 8 years ago 6577
Laravel Load More Data on Page Scroll – Laravel 5
dave 8 years ago 8994
Laravel 5.4 Upload Image with Validation example
dave 8 years ago 21415