Skip to content

Instantly share code, notes, and snippets.

View muhtarudinsiregar's full-sized avatar
🎯
Focusing

mhtrdn muhtarudinsiregar

🎯
Focusing
View GitHub Profile
@muhtarudinsiregar
muhtarudinsiregar / auth.php
Created October 24, 2018 01:58
laravel 5.7 config/auth.php for dingo api with jwt-auth
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
class AuthController extends Controller
{
/**
@muhtarudinsiregar
muhtarudinsiregar / User.php
Created October 28, 2018 14:50
Implement JWTSubject in user model
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Tymon\JWTAuth\Contracts\JWTSubject;
class User extends Authenticatable implements JWTSubject