PHP code example of novay / smrpas

1. Go to this page and download the library: Download novay/smrpas 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/ */

    

novay / smrpas example snippets




namespace App\Models;
...
use Novay\Smrpas\Traits\TokenTrait;

class User extends ...
{
    use TokenTrait;
    
    // Other model properties and methods...
bash
php artisan vendor:publish --provider="Novay\Smrpas\SmrpasServiceProvider"
bash
php artisan migrate --path=vendor/novay/smrpas/src/Database/migrations/2023_09_26_100536_create_oauths_table.php
bash
OAUTH_SERVER_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
OAUTH_SERVER_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
OAUTH_SERVER_REDIRECT_URI=https://yourdomain.com/oauth/callback
OAUTH_SERVER_URI=https://smrpas.samarindakota.go.id
OAUTH_PROMPT=consent
OAUTH_HOME=/dashboard