PHPackages                             mark-villudo/laravel-login - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. mark-villudo/laravel-login

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

mark-villudo/laravel-login
==========================

Laravel package API and in CMS login.

110PHP

Since Jan 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/MarkVilludo/laravel-login)[ Packagist](https://packagist.org/packages/mark-villudo/laravel-login)[ RSS](/packages/mark-villudo-laravel-login/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-login
=============

[](#laravel-login)

Laravel package API and in CMS login.

Installation
------------

[](#installation)

Require this package with composer.

```
//Passport requires league/oauth2-server which requires defuse/php-encryption hence the issues.
//See https://github.com/paragonie/random_compat/issues/147

composer require paragonie/random_compat:2.*
composer require mark-villudo/laravel-login
```

\##Setup Laravel Passport Configs.

1. After successfully install package, open config/app.php file and add service provider.

```
'providers' => [

  ....

  Laravel\Passport\PassportServiceProvider::class,

],

```

2. Run Migration and Install

```
php artisan migrate

```

Next, we need to install passport using command, Using passport:install command, it will create token keys for security. So let's run bellow command:

```
php artisan passport:install

```

3. \[Passport Configuration\] In this step, we have to configuration on three place model, serviceprovider and auth config file. So you have to just following change on that file.

In model we added HasApiTokens class of Passport,

In AuthServiceProvider we added "Passport::routes()",

In auth.php, we added api auth configuration.

app/User.php

```
