Laravel Community Tools by Tighten

Popular tricks

458 tricks
This is usefull for migrations when you can't rollback. Can easily be run in artisan mode or you can create a console command.
naneri 10 years ago 14748
Hello ! I'm trying to publish an application on an IIS server where my application is in a subfolder. However when trying to enter it's giving me the following error: NotFoundHttpException Application.php line in 1105 : I ran a dd () on routes and printed on the screen normally. I do not know what might be happening . Could someone help me ?
atilarampa... 11 years ago 14588
5.0
Laravel has many choices for performing a query, sometimes it could be confusing, I hope this list help you to clear any doubts. If you know other way please show it in comments for add it.
luismec90 12 years ago 14332
When showing a website through a Facebook Page tab validation errors are not displayed, because Facebook "forgets" the sessions due to the page proxy. One problem with this is that session data is destroyed / forgotten on each request going through that proxy. This applies to Redirect::back()->withErrors($validator) for showing the form with validation errors because sessions are used . To avoid this simply fiddle the error data together and pass it directly to the respective action that handles the input form. One thing to mention is that calling other controller actions directly of course does not affect the route. Let's say editing happens at "/edit" and the "registration complete" message is shown at "/complete". Calling the action within the controller the form with errors is now shown at "/complete" whereas "/edit" would be shown if you redirected back (Line 22). I personally don't really care too much about this since the "real" web address is not shown in the FB page tab anyway due to the page proxy. Looking forward to hearing your opinions on this. Maybe there is even a better way.
flei 12 years ago 14331
When you're into making an API, you may wish to make the format of the responses you provide dynamic. If you're not using controllers, you would make a class, but if you use controllers, it's a pretty good idea to place it in the base controller. As well you may restructure your response data to include more fields, e.g. for testing purposes you may wish to also include some custom debug.
vlakarados 12 years ago 14259
FastAPI-inspired attribute-based routing to Laravel, simplifying the way routes, methods, and middlewares are defined. With this package, you can group routes using the FastAPIGroup attribute, set middleware directly on controllers, and specify HTTP methods and paths using attributes like FastAPI. This elegant approach allows developers to write cleaner, more organized, and maintainable route definitions, offering a powerful alternative to traditional Laravel routing.
mustafakha... 2 years ago 14127
Set browser cache invalidation headers on a PER route basis using Route Middleware.
jhauraw 11 years ago 13927
Hi, I have 3 tables USER, ALBUMS, PHOTOS USER has one to many relation with ALBUMS, ALBUMS has one to many relation with photos. My relation mapping as follows
ajeeeunni 10 years ago 13924
DB Seeder tool: https://github.com/haruncpi/db-seeder
haruncpi 6 years ago 13914