A package often is a library that has been prepared in some way to be installed using a package manager.

Entrust

This package gives an adaptable method to add Role-based Permissions to your Laravel 5 application. Also it creates four new tables: role table contains role information, permission table contains permission information, role_user table contains relations among roles and users, permission_role table contains relations between roles and permissions.

$admin = new Role();

$admin->name = 'admin';

$admin->display_name = 'User Administrator'; // optional

$admin->description  = 'User is allowed to manage and edit other users'; // optional

$admin->save();

Laravel Debugar

It is one of the best laravel package in Laravel Debugar which adds developer toolbar for debugging the PHP and Laravel code of your app. Further this package is mainly used for debugging purpose. There are a lot of tabs available in Debugar. And each tab shows different information.

Debugbar::info($object);
Debugbar::error('Error!');
Debugbar::warning('Watch out…');
Debugbar::addMessage('Another message', 'mylabel');

Socialite

Socialite is a laravel package where authentication with different social network providers is a breeze. It provides simple and easy way for handling OAuth authentication. Also facilitates users to login via some of the most popular social network and services including Facebook, Twitter, Google, LinkedIn, GIthub, GitLab and Bitbucket.

$user = Socialite::driver('github')->user();

// OAuth Two Providers
$token = $user->token;
$refreshToken = $user->refreshToken; // not always provided
$expiresIn = $user->expiresIn;

// All Providers
$user->getId();
$user->getName();
$user->getEmail();
$user->getAvatar();

User Verification

Laravel user verification is a PHP package to easily handle a user verification and validate email built for laravel 5 . It generates and store a verification token for the registered user, sends or queue an email with the verification token link, handle the token verification, set the user as verified and relaunch the process anytime.

protected function validator(array $data)
{
    return Validator::make($data, [
        'name' => 'required|max:255',
        'email' => 'required|email|max:255|unique:users',
        'password' => 'required|min:6|confirmed',
    ]);
}

Intervention Image

Intervention Image is an open source PHP image handling and manipulation library. It provides an easier and expressive way to create, edit and compose images and supports currently the two most common image processing libraries GD Library and Imagick.

// open an image file
$img = Image::make('public/foo.jpg');

// now you are able to resize the instance
$img->resize(320, 240);

// and insert a watermark for example
$img->insert('public/watermark.png');

// finally we save the image as a new file
$img->save('public/bar.jpg');

Maatwebsite

Laravel excel also known as maatwebsite is great for exporting and importing excel file. Laravel Excel is intended at being Laravel-flavoured PhpSpreadsheet: a simple, but elegant wrapper around PhpSpreadsheet with the goal of simplifying exports and imports.

$array = Excel::toArray(new UsersImport, 'users.xlsx');

$collection = Excel::toCollection(new UsersImport, 'users.xlsx');

Conclusion

This brings to the end of this article. I have demonstrated different laravel packages in this article which you can use to optimize your projects productivity. Also, post your top picks of laravel package on the comment section, would like to count on your best suggestion.

Comments

  1. Hi, sushankpokharel.com.np

    I’ve been visiting your website a few times and decided to give you some positive feedback because I find it very useful. Well done.

    I was wondering if you as someone with experience of creating a useful website could help me out with my new site by giving some feedback about what I could improve?

    You can find my site by searching for “casino gorilla” in Google (it’s the gorilla themed online casino comparison).

    I would appreciate if you could check it out quickly and tell me what you think.

    casinogorilla.com

    Thank you for help and I wish you a great week!

  2. Thаnk you, I’ve just been searching for info about
    this topic for ages and yours is the greatest I have came
    upon tіll now. However, what about the conclusion? Are you posіtive ϲoncerning the supply?

Leave a Reply

Your email address will not be published. Required fields are marked *