In the previous tutorial, we created all the migrations files and the corresponding model that respect our UML design. In this tutorial, we’ll only work on models by adding fillable and Eloquent relationships.
The fillable attributes are the fields of the table that can be filled from an array to directly create a new record in our database. Eloquent relationships are defined as methods in our Eloquent model classes that serve as powerful query builders mechanisms.
To have an explanation about Eloquent Relationship, hit the documentation so you will easily the following content.
Post class
BlogCategory class
Users class
Image class
Comment class
I really advise you to read the documentation relating to the Eloquent relationship, it’s a lifesaver concept while working with Laravel. Also, the complete source is available. You can choose to learn from the code itself.
If development isn’t your field, consider hiring Laravel specialists who can supercharge your application’s scalability and performance with precision.
I am a Master’s student in computer science passionate about DevOps, Cloud Computing, AI, and BI. I am also a web developer, especially with Django and Laravel Frameworks. I love to share things that work for me with others to save them time searching through the internet to solve the same problem.