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

Описание к видео What are the Must Known Laravel Model Conventions? | Laravel Models 101: for Beginners

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: [https://www.codewithdary.com](https://www.codewithdary.com/)

🔥 Resources

Twitter:   / codewithdary  
Instagram:   / codewithdary  
Blog: https://blog.codewithdary.com/
GitHub: https://github.com/codewithdary/nova-...
TikTok:   / 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

Комментарии

Информация по комментариям в разработке