Laravel Community Tools by Tighten

Tag "models" tricks

58 tricks
Translatable Pro is designed for performance, storing phrases in separate database tables to simplify the maintenance of translations across all languages. With just one Composer install, you can seamlessly integrate comprehensive multi-language support into your app, enabling you to create advanced, optimized, and high-performance translatable applications with an efficient database structure.
a7medKhali... 1 year ago 20290
Laravel Settings to create your website and model settings in an easy way, you can find all details about the package here: https://github.com/yazan-alnugnugh/laravel-settings
yazan-alnu... 4 years ago 44367
Laravel World is a package providing a list of the countries, states, cities, currencies, and timezones. World integrates data with Eloquent models via the database and provides facades, helpers, and API routes. https://github.com/nnjeim/world
nnjeim 4 years ago 41138
We have already known the usage of accessors and mutators. We use accessors in laravel model to modify any field data while retrieving the records and mutators to modify any field data while inserting to database. So, to modify any field before, we needed two separate methods for a single filed i.e. one method for accessor and one for mutator but in latest laravel release I mean in laravel 8.77.0, we can use a single method for both accessor and mutator using closure . Given below is the syntax for single mehtod accessor and mutator:
asifzcpe 4 years ago 34570
Disable Laravel's Eloquent timestamps
saravanaku... 4 years ago 29835
Save yourself from all the boilerplate of tracking/observing and reacting to model attribute changes.
alexstewar... 4 years ago 12904
This query searches the data from the Table and also with its relation table columns dynamically.
Muzamil-kh... 4 years ago 10070
Get products count which are under sub categories of a parent category
Faridbabay... 4 years ago 11394
set custom table name for eloquent model
uniqueginu... 4 years ago 7919