Laravel Community Tools by Tighten

Popular tricks

458 tricks
Laravel is a web application framework with expressive, elegant syntax.The PHP Framework for Web Artisans,freeing you to create without sweating the small things. CRUD Operation With Server Side.
pakainfo-c... 6 years ago 13188
There are a few tips already for active states on navigation, however none are based on Route names. I prefer to use Route names for all routes, so here is a modified version of the "active states" trick for route names.
chadwithuh... 12 years ago 13038
Save yourself from all the boilerplate of tracking/observing and reacting to model attribute changes.
alexstewar... 4 years ago 13013
This snippet will explain how to use environment variables to configure your environment. Blog post: http://dor.ky/laravel-homestead-add-enviroment-variables-to-nginx/
ssx 12 years ago 12986
4.1
Here a user has a location with many to many positions. This query finds users having position id 4 and location id 6. the tables are users, profile, locations. and profile has location_id.
sanjok1988 5 years ago 12936
Dynamically testing and Pagination feature in a Restful API
Mahmoudz 10 years ago 12937
Ever wanted to route pretty SEO urls to a controller with a specific ID without having to query the DB every time to match the URL to the page? On a number of projects previously, I've created cached versions of route files so that we can save all the URLs for a site and cut down on DB queries to work out what item we're viewing. Create another routes file that you write to whenever an entry is saved. You may end up with a lot of entries in the file, as each route will be for an individual item. Pass the ID to your controller action via the route like so:
Brunty 12 years ago 12919
4.1
Suppose you want to use Laravel query builder to search items in your db like this ?filter[search]=yourkeyword
SlimGee 2 years ago 12915
Laravel offers a dynamic interface for assigning certain data. This can be used e.g. for adding a dynamic 'where' to your Eloquent queries. However, not everyone know that this same trick also works on View assignments!
stidges 12 years ago 12842