Laravel Community Tools by Tighten

Popular tricks

458 tricks
This filter will prevent the route from having sessions enabled. Very useful for API calls and when you don't want sessions starting. Blog Post: http://dor.ky/laravel-prevent-sessions-for-routes-via-a-filter/
ssx 12 years ago 11435
Laravel's docs suggest to override the Model's getDates() methods when adding your own date fields. http://laravel.com/docs/4.2/eloquent#date-mutators To keep the default created_at, updated_at and deleted_at date fields, these must also be returned by the method, giving you at least 4 elements to the array. An easier (or at least, tidier) way is to set the protected $dates property with your own fields. These are merged with the defaults.
meigwilym 11 years ago 11429
in this example there is a one to many relation. [course has many chapters]
Mahmoudz 10 years ago 11425
It's easy to notify one user by mail. But how to send a mail to all members of a Team? You can send one email to multiple recipients but it's not convenient, as it discloses recipient emails, which is not secure. Thus, you need to send bunch of personal emails on a loop. To do this create new TeamMailChannel and get MailChannel inside of it. Then iterate over users of a group and send emails. Your notification class should include TeamMailChannel inside via, however you should still use `toMail` method to prepare a message.
DavertMik 7 years ago 11373
5.6
This snippet can be used to view a linked list to all your available views, useful for reviewing different screens.
mohamed 12 years ago 11253
Leverage AI API to streamline resume parsing and data extraction in your HR Tech applications with AI-powered SharpAPI.
makowskid 1 year ago 11282
api
Hi ! Write your templates, controllers, ... without boring with translations. When you have finished to code, just execute the following command. It will generate and synchronise all needed files in your `lang/*/` directories. The package is available here : https://github.com/potsky/laravel-localization-helpers
potsky 12 years ago 11205
When saving/updating a model you might want to get a JSON response that includes some relationship data as well.
m4nuC 12 years ago 11214
Its Diffucult to convert whole object to an array . Normally we are Doing it By Iterate through foreach. By using Below Code we will reduce amount of line of code
kmlnyk 9 years ago 11180