Laravel package is very useful for optimizing your web application. If you want to make an optimized website, you must know the top laravel packages that are used in different things. In this tutorial, we explain popular laravel packages for optimizing your application.
You read here the top 10 useful laravel packages.
What is Laravel package
Laravel is the most popular PHP framework that supports composer for install packages. A package provides some complex functionality by simple methods and it makes development easy and fast.
Top 10 laravel packages List in 2022
Here is a list of top 10 useful laravel packages in 2022 for optimize your application.
1. Spatie user role and permission
2. Laravel Passport
3. Barryvdh Laravel Debugbar
4. Sociaate
5. Eloquent-Sluggable
6. No Captcha
7. Laravel Cashier
8. Laravel Seoable
9. Laravel Yoeunes Toastr
10. Laravel Jetstream
1. Spatie user role and permission
When you make an application that manages multiple role users then it manages by complex code and is also not optimized properly. Laravel provide Spatie role and permission package. It provides a roles table for managing different roles like admin, sub-admin, and users. Spatie is one of the most useful laravel package.
Install Spatie package by run composer require spatie/laravel-permission command
Features of Spatie role and permissionRoles Permissions Middleware Multiple role and permission check methods Optimize tables
For more detail of Laravel Spatie role and permission
2. Laravel Passport
Laravel passport is a very useful package for API development it provides a passport token that takes login user details and is used for secure login routes. It provides full OAuth2 server implementation for your Laravel application
You can install this package by running command composer require laravel/passport and after install run migration (php artisan migrate) for creating tables.
For more detail of Laravel passport.
3. Barryvdh Laravel Debugbar
Barryvdh Laravel Debugbar is provide a debug bar that include many things like message, queries and execution time. It helps to optimize database queries and speed up code. As its name, its used for debugging the code
You can install Barryvdh Laravel Debugbar by run command composer require barryvdh/laravel-debugbar --dev.
4. Socialite
Socialite provide a simple and easy way to handle OAuth authentication. It allows the users to log in with many social media services including Facebook, Twitter, Google, GitHub, and BitBucket. Socialite documentation provides by laravel official documentation.
You can install Socialite by running command composer require laravel/socialite
# install composer require socialiteproviders/twitter # register protected $listen = [ \SocialiteProviders\Manager\SocialiteWasCalled::class => [ 'SocialiteProviders\Twitter\TwitterExtendSocialite@handle' ], ]; # configure 'twitter' => [ 'client_id' => env('TWITTER_KEY'), 'client_secret' => env('TWITTER_SECRET'), 'redirect' => env('TWITTER_REDIRECT_URI'), ] # start building return Socialite::driver('twitter')->redirect();
More detail of Laravel Socialite package.
5. Eloquent-Sluggable
Laravel Eloquent-Sluggable package is very useful package for create Seo friendly URLs. It creates a unique slug according to the title or provide condition. It removes spaces and adds dash to make an SEO-friendly URL. This package is used inside of the laravel model.
Check more explaination of Eloquent-Sluggable package
6. No Captcha
Laravel No Captcha is a useful package for implementing Google reCaptcha validation and protecting forms from spam attacks. First, you generate an API key for using this package.
More information about No Captcha.
7. Laravel Cashier
Laravel Cashier package is use for integrate strip payment gateway. It provides an easy way to integrate strip payment and billing services. Billing service means it provides a subscription service that cut automatic payment after a fixed time cycle.
Install laravel casier by running command composer require laravel/cashier.
You can see more detail of this package in laravel documentation Laravel Cashier.
8. Laravel Seoable
Laravel Seoable is best package for SEO requirements. It provides many SEO techniques that make laravel websites top-rank. It provides an easy way to manage SEO meta tags.
Features of this package
- Mapping Eloquent attributes to SEO meta tags
- Set meta title and description
- Save custom SEO data for any Model in your application
Check more detail about Laravel Seoable.
9. Laravel Yoeunes Toastr
Yoeunes Toastr is a laravel package that is used to print sweet messages. It is useful when we save, update and delete data after the redirect show success or error message. It prints user-friendly and responsive messages
// Set a warning toast, with no title toastr()->warning('My name is Inigo Montoya. You killed my father, prepare to die!') // Set a success toast, with a title toastr()->success('Have fun storming the castle!', 'Miracle Max Says') // Set an error toast, with a title toastr()->error('I do not think that word means what you think it means.', 'Inconceivable!') // Override global config options from 'config/toastr.php' toastr()->success('We do have the Kapua suite available.', 'Turtle Bay Resort', ['timeOut' => 5000])
you can download toaster form here Laravel Yoeunes Toastr
10. Laravel Jetstream
Laravel Jetstream is a useful package for providing a start point for the application. It set some features automatically including login, registration, two-factor authentication, and many other features. Laravel Jetstream is also laravel partner.
These are top 10 useful package in laravel to optimize and easy development of application.