PHP code example of ijp / auth

1. Go to this page and download the library: Download ijp/auth library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ijp / auth example snippets


   use Tymon\JWTAuth\Contracts\JWTSubject;
   use Ijp\Auth\Traits\IjpAuth;

   class User extends Authenticatable implements JWTSubject
   {
       use Notifiable , IjpAuth;
        protected $keyType = 'string';


       // Implementasi metode yang diperlukan

   }
   

       ->withMiddleware(function (Middleware $middleware) {
        $middleware->alias([
            'authcheck' => AuthCheck::class,
        ]);
    })
   

   use App\Http\Controllers\AuthController;

   Route::post('/login', [AuthController::class, 'login']);;
   

   use App\Helpers\ResponseJsonFormater;
   
bash
   php artisan ijp:install
   
bash
   php artisan vendor:publish --tag=jwt-auth-routes
   php artisan vendor:publish --tag=jwt-auth-migrations
   php artisan vendor:publish --tag=jwt-auth-routes
   

    php artisan jwt:secret