LARAVEL

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:

  1. How many tables are needed for this functionality?
  2. How do I map the relations?
  3. Is it a one-to-many, many-to-many, polymorphic relationship?
  4. What extra things do I need this Model to have?
  5. 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

  1. 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.
  2. Laravel likeable:  This helps you implement your like system in your Laravel project.
  3. Laravel Friendable: This helps you implement your friendship system in your Laravel project.
  4. Laravel Voteable: On Hacker news, you can upvote or downvote posts. This helps you implement voting system in your Laravel project.
  5. Laravel Friendship: This is an alternative to Laravel Friendable. It helps you manage your friendships in your Laravel project.
  6. Laravel Commentable: This helps you implement a commenting system in your Laravel project.
  7. 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.

Conclusion

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!

 

PROSPER OTEMUYIWA

About PROSPER OTEMUYIWA

Food Ninja, Code Slinger, Technical Trainer, Accidental Writer, Open Source Advocate and Developer Evangelist.