Free courses from frontend to fullstack and AI
Lead AI-Native Products with Microsoft's Agentic AI Program
Overview
Google, IBM & Meta Certificates — All 10,000+ Courses at 40% Off
One annual plan covers every course and certificate on Coursera. 40% off for a limited time.
Get Full Access
Explore essential Laravel model conventions in this 14-minute tutorial designed for beginners. Learn how to customize timestamps, specify date formats using the $dateFormat property, modify column names for created_at and updated_at, set default attribute values, and work with multiple databases using the $connection property. Master these key concepts to enhance your efficiency with Eloquent models and leverage Laravel's powerful ORM features. Gain valuable insights to write cleaner, more maintainable code in your Laravel applications, whether you're new to the framework or an experienced developer.
Syllabus
- Introduction
- Changing table names
- Changing the primary key
- Incrementing property
- Changing the key type of the primary key
- Disabling the updated_at and created_at
- Customizing the format of your models timestamps
- Customize the names of the timestamps columns
- Set default attribute values
- Change the database interacting with a particular model
Taught by
Code With Dary