7 Laravel Packages to Supercharge your Models
We cook, eat, think and build Software daily as Engineers. Several times, we come across new challenges, new features that invokes serious thinking, new problems that almost brings our brains to a screeching halt as a result of its complexity.
As a developer using Laravel to build software, you are often faced with creating Models and Migrations in a bid to establish relationships between your database tables. In some situations, you might have done the exact same thing before so it looks like pie, sometimes it’s new.
Take for instance, you’re tasked with building out a social network. You need to build out the comment system, the friend request and acceptance system, the like/favorite system and all of those several features that involves having a well-thought out database design structure.
You start asking yourself questions like:
- How many tables are needed for this functionality?
- How do I map the relations?
- Is it a one-to-many, many-to-many, polymorphic relationship?
- What extra things do I need this Model to have?
- Fat Models, Skinny Controllers is the custom, So how I do shift majority of the logic to the Models?
Well, I have good news for you. Some folks have developed features like this before and have been blessed with a good heart to extract some of the recurring features into Laravel packages that other developers can consume.
7 Packages you can Leverage
- Teamwork: This deals with User to Team associations coupled with an invitation system. It is one of the fastest and easiest methods to add a User/Team association with invites to your Laravel 5 project.
- Laravel likeable: This helps you implement your like system in your Laravel project.
- Laravel Friendable: This helps you implement your friendship system in your Laravel project.
- Laravel Voteable: On Hacker news, you can upvote or downvote posts. This helps you implement voting system in your Laravel project.
- Laravel Friendship: This is an alternative to Laravel Friendable. It helps you manage your friendships in your Laravel project.
- Laravel Commentable: This helps you implement a commenting system in your Laravel project.
- Laravel Commentable: This is an alternative to the one listed above. It also helps you understand how to implement a commenting system in your Laravel project.
Check out these packages listed above and go through their comprehensive documentation to understand how to use them in your Laravel app.
It’s not necessary for you to actually use these packages in your project but if you do it can speed up the process of building that app. One major thing I do which I’ll recommend is going through the source code of these packages, understand the thought process of the author, how he/she went about the migrations and the model system and leverage on that.
Let me know in the comment section if you have used any interesting Laravel package that implements some of the recurring features developers face on their day-to-day projects.
NOTHING BEATS THE POWER OF LEVERAGE!
- How to build your own Youtube – Part 10 - August 1, 2016
- How to build your own Youtube – Part 9 - July 25, 2016
- How to build your own Youtube – Part 8 - July 23, 2016
- How to build your own Youtube – Part 6 - July 6, 2016
- Introducing Laravel Password v1.0 - July 3, 2016
- How to build your own Youtube – Part 5 - June 28, 2016
- How to build your own Youtube – Part 4 - June 23, 2016
- How to build your own Youtube – Part 3 - June 15, 2016
- How to build your own Youtube – Part 2 - June 8, 2016
- How to build your own Youtube – Part 1 - June 1, 2016