PHP code example of dost-tapi / portal-integration

1. Go to this page and download the library: Download dost-tapi/portal-integration 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/ */

    

dost-tapi / portal-integration example snippets


// In your routes/web.php
Route::middleware(['portal.sso'])->group(function () {
    Route::get('/dashboard', [DashboardController::class, 'index']);
    Route::get('/profile', [ProfileController::class, 'show']);
});

Route::middleware(['portal.api'])->group(function () {
    Route::post('/custom-endpoint', [CustomController::class, 'handle']);
});
bash
php artisan vendor:publish --provider="DostTapi\PortalIntegration\PortalIntegrationServiceProvider" --tag="portal-integration-config"
bash
php artisan vendor:publish --provider="DostTapi\PortalIntegration\PortalIntegrationServiceProvider" --tag="portal-integration-migrations"
bash
php artisan migrate
bash
php artisan portal:sync-roles