Skip to content

Commit

Permalink
Passport
Browse files Browse the repository at this point in the history
* Add passport
  • Loading branch information
deanblackborough committed Jul 18, 2018
1 parent eb7d0c2 commit 03d8114
Show file tree
Hide file tree
Showing 13 changed files with 1,204 additions and 5 deletions.
28 changes: 28 additions & 0 deletions app/Http/Controllers/HomeController.php
@@ -0,0 +1,28 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}

/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('home');
}
}
3 changes: 2 additions & 1 deletion app/Providers/AuthServiceProvider.php
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Laravel\Passport\Passport;

class AuthServiceProvider extends ServiceProvider
{
Expand All @@ -25,6 +26,6 @@ public function boot()
{
$this->registerPolicies();

//
Passport::routes();
}
}
3 changes: 2 additions & 1 deletion app/User.php
Expand Up @@ -4,10 +4,11 @@

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Laravel\Passport\HasApiTokens;

class User extends Authenticatable
{
use Notifiable;
use HasApiTokens, Notifiable;

/**
* The attributes that are mass assignable.
Expand Down
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -8,6 +8,7 @@
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.6.*",
"laravel/passport": "^6.0",
"laravel/tinker": "^1.0"
},
"require-dev": {
Expand Down

0 comments on commit 03d8114

Please sign in to comment.