What are the Must Known Laravel Model Conventions? | Laravel Models 101: for Beginners #laravel

Subscribers:
64,200
Published on ● Video Link: https://www.youtube.com/watch?v=f2s60YVkkhA



Duration: 0:00
1,896 views
84


In this tutorial, we explore essential Laravel model conventions that every Laravel developer should know. We cover key concepts such as:

Timestamps and how to customize them
The $dateFormat property for specifying date formats
Customizing column names for created_at and updated_at
Setting default attribute values
Using the $connection property to work with multiple databases

By mastering these conventions, you'll be able to work more efficiently with Eloquent models and leverage Laravel's powerful ORM features to their fullest potential. Whether you're a beginner or an experienced developer, this tutorial will help you write cleaner, more maintainable code in your Laravel applications.

🧑🏼 ‍💻 Need a Laravel agency?
Do you need assistance with your next project in Laravel? Contact my Laravel agency for help: [hhttps://www.codewithdary.com/(hhttps://www.codewithdary.com/

🔥 Resources

Twitter:  https://twitter.com/codewithdaryInstagram:  https://www.instagram.com/codewithdary/Blog: hhttps://blog.codewithdary.com/GitHub: hhttps://github.com/codewithdary/nova-custom-fields/TikTok:  https://www.tiktok.com/@codewithdary
⌛ Timestamps
00:00 - Introduction
01:25 - Changing table names
03:10 - Changing the primary key
04:58 - Incrementing property
06:31- Changing the key type of the primary key
07:31- Disabling the updated_at and created_at
09:22 - Customizing the format of your models timestamps
10:12- Customize the names of the timestamps columns
10:46 - Set default attribute values
12:50 - Change the database interacting with a particular model

#laravel #codewithdary #laravel #php #coding




Other Videos By Code With Dary


2025-03-17A Beginner's Guide to Variables in PHP - How to Define Variables in PHP #php #shorts
2025-03-14How to Select a Random Collection Row in Laravel using inRandomOrder() #laravel #shorts
2025-03-12How to use Laravel its Unique forget() Method #laravel #shorts
2025-03-10How to Use Laravel its Unique pop() Method #laravel #shorts
2024-10-11How to Change the Primary Key of Your Laravel Through the Model #laravel #models
2024-10-09How to Disable Timestamps in Your Laravel Model #laravel #shorts
2024-10-07How to Use Full Text Indexes for beginners | Full Text Indexing in Laravel for Beginners #laravel
2024-10-04How to Connect a Laravel Model to a Different Database Connection #laravel #shorts
2024-10-02How to Fix Image Preview Issues in FilamentPHP #filamentphp #shorts
2024-09-30What are the Must Known Laravel Model Conventions? | Laravel Models 101: for Beginners #laravel
2024-08-05How to Use DigitalOcean Spaces in Laravel & FilamentPHP | How to Use Laravel S3 Bucket
2024-06-28Is This Laravel’s Coolest Method? Spell Numbers to Strings?! #laravel #shorts
2024-06-26Discover the Magic of Laravel's Appends Functionality #laravel #shorts
2024-06-24How Laravel EASILY Hashes Passwors For You #laravel #shorts
2024-01-26How to Easily Add Global Key Bindings in FilamentPHP #filamentphp #shorts
2024-01-25How to Easily Add an Icon to a Text Column in FIlamentPHP #filamentphp #shorts
2024-01-23Can You STOP Validating On First Error in Laravel?! #laravel #shorts
2024-01-22How to Make Dependent Select Options Based By Another Select Option in FIlamentPHP
2024-01-12How to Easily Customize the Model Label Name in FilamentPHP Resources #filamentphp #shorts
2024-01-11How to Enable All Authentication Features in FilamentPHP #filament #shorts
2024-01-09How to ‘Copy to Clipboard’ Text From Your Resource View FilamentPHP #filamnetphp #shorts