laravelbasicsblog-page
Laravel Eloquent Basics of Basics
2 min read
introduction
I'm sorry I could not cover all the topics that I wanted to I got sick and was taking a rest almost whole day. But I tried to cover a little before going to sleep
problems
- running Fever
- tiredness
- boredom
- lack of motivation
learnings
- eloquent orm was especially created for laravel and used almost everywhere you would need to modify or create relational data
- after creating model with the
-atag- You can add additional details to the migration file for various datatypes
- like string, integer, number, boolean, date, etc.
- you can use
protected $fillable = [];to notify the system that the backend can fill this data dynamically, if not here then it is not fillable by backend. - importing the model with the
use app\Models\Post;automatically imports all the data related to the model from the database while keeping the data invisible to the developer. - then passing the data back to the user via frontend UI is as simple as compacting the data to the frontend via the same method we spoke about in yesterday's blog post.