Laravel Community Tools by Tighten

Recent tricks

458 tricks
Instead of always having to include the button to open the modal, create the modal and all its contents, you can dynamically create the modal and load the route of the content you want to open in a very simple way. This allows you to still display the ever updated data without much effort in editing cases.
sr2ds 7 years ago 14740
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 11185
5.6
It is always painful to remember the password of the sample accounts and login with them while you are working on your project and test it. You can use this package to easily and securely login with any password without touching your code. https://github.com/imanghafoori1/laravel-anypass https://github.com/imanghafoori1/laravel-anypass
imanghafoo... 7 years ago 6165
Sometimes we need to validate that several fields that are partial percentages don't sum up over the 100%. It is possible to achieve this with a custom validation rule and then using it on each partial, indicating the other fields as arguments.
alariva 7 years ago 8619
5.6
Use Carbon lt() and gt() in the view to only show certain content if it's before or after a current date/time.
mattstauff... 7 years ago 4640
You might come up with a situation where you want to check if a given Eloquent attribute was changed compared with its original stored value.
laraning 7 years ago 25058
This a simple way to use wilcard routing, for specific options.
neftaliyag... 7 years ago 3562
Dialog to Confirm before delete
jtmaingi 7 years ago 5864
with this trait you can get Enum values of a table /
nimahkh 7 years ago 12610