Eloquent Model class is used for Laravel’s ‘active record implementation’ methods. It literally means that we can easily ‘CREATE, RETRIEVE, UPDATE, or DELETE’ any database record using this Eloquent Model class.
In the Laravel PHP artisan command we generate files through ‘make’. We have seen it before in case of ‘controllers’, ‘migrations’. Now we can do the same thing in our Model class.
Remember one thing: if you have a table called ‘tasks’, then you must have a model called ‘Task’. If we have a table called ‘songs’, we must have a model called ‘Song’. In the model, the name starts with the capital letter and the ...