There's always been a lot of talk about PHP, with a lot of people claiming it's a “crap” language. It was my first programming language. I know it has some shortcomingsâ€Š–â€Šas do all languagesâ€Š–â€Šbut it's been my go-to language for server-side operations. I keep telling people I learnt almost every OOP concept and design pattern I know in PHP. I've been writing a lot of Java lately but I'm still known as the “PHP guy” at the office. All my personal projects are and will be written in PHP using the Laravel framework. It's one I love.
There's a thrill to solving problems but there's no prize for reinventing the wheel. These are some Composer packages that make it into almost every Laravel project I start, each making life a tad easier.
Some people say Laravel operates with a lot of “Magic”. LOL. With Facades and the way Eloquent models work, IDEs may not know how to provide syntax highlighting and other goodies. This package by Barry Heuvel generates a file that your IDE understands to provide correct auto-completion. It works great with PHPStorm and the Laravel Plugin for IntelliJ IDEA which provides help for blade syntax highlighting and routing.
Laratrust is a role-based access control package for Laravel. It is maintained by Santiago GarcÃa and is a fork of Zizaco's Entrust package. Laratrust was created because of maintenance and documentation issues the original project faced. It is my go-to package for role and permission based access control. It is easy to setup, is well documented (A comprehensive wiki) and provides blade directives for easy content display logic.
A search trait for Eloquent models. It allows you to perform simple searches on tables giving different priorities to each column. It allows for a variety of custom queries too. It makes searching tables a breeze. It is actively maintained by NicolÃ¡s LÃ³pez Jullian.
Laravel-Stapler is a file upload package for the Laravel created by Code Sleeve based on a PHP package called Stapler by the same folks. It works great if you want to upload a file and tag it to a model instance and lets you display or gain access to the file easily through the models' properties–a simple case like an avatar for a user. What's nice is it'll handle image resizing to different quality levels defined by you. It also supports file uploads to Amazon S3 instead of the traditional file system. It's not a complete saviour though as I have run into problems when trying to fasten multiple files to one model instance. It should work for simpler use cases though and could save a lot of time. It's easy to get started as the documentation is straight forward.
Guzzle is a package that makes network requests trivial. It is not a Laravel specific package but it deserves a mention. If you ever have to call a web service, you should look to Guzzle. We're not all comfortable with cURL.
A jQuery DataTables API for Laravel. It provides an interface that the jQuery Datatables plugin can hook into for data. It helps eliminate the need to grab all the data in a collection to dump in the view. You only provide a web interface to return the data from this package and configure Datatables to hook into that route. It would lazy-load the data and allow Datatables functionality like searches and pagination. It's easy to get started with the documentation provided. It is maintained by Arjay Angeles
These are packages that have saved me time and sanity for sometime now.
If you know any project you think should be on this list, leave it in the comments section below, I'll check it out. We can start a convo around this.