Introduction to Laravel – Part 3 of 3

Laravel, how can it be extended?

Packages

As we have seen in this series Laravel comes with a huge amount of functionality built in, but, it can also be extended to encompass even more functionality. This is done to add extra functionality to your App, in general there are 2 different types of packages: Stand alone packages that can be used in any PHP Framework and Laravel Specific Packages that are designed for use just with Laravel and often contain routes and controllers.

Stand alone packages are packages that can be used with any PHP Framework, some examples of this are:

  1. Carbon, This package extends the PHP DateTime Classes, it helps with managing dates and times within PHP. Website
  2. Behat, This package is a Behaviour Driven Development Framework for PHP, it helps with testing an app to ensure that the correct behaviour is occurring based on some inputs. Website

Laravel Specific Packages are packages designed for use only with Laravel, some examples of these are:

  1. Laravel Google Recaptcha, This package is used to implement Google Recaptcha as a Validation Rule rather than coding in this validation manually. Website
  2. Laravel Masterpass, This package extends the authentication in Laravel, it allows you to login to any account with either their password or a master password set by yourself in the main environment file. Website

As you can see there are a mix of different use cases for both types of package, from a general extension to PHP Base Classes to a much more specific use like implementing Google Recaptcha for Laravel.

Here is a list of some of the more common Laravel Specific Packages used by developers: https://www.cloudways.com/blog/best-laravel-packages/

There are hundreds of Packages available through Composer, full list available here. If you would like to create your own Laravel package there are lots of tutorials available online, this is one that I have used previously: Website.

 

@CadburyUK Dairy Milk and Age UK encourage kind gestures to solve old age loneliness.They have demonstrated how a s… https://t.co/VGilLa2nPS