PHP code example of openwod / service-accounts

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

    

openwod / service-accounts example snippets


'svc' => [
	'driver' => 'sanctum',
	'provider' => 'svc',
    'hash' => true,
],

'svc' => [
	'driver' => 'eloquent',
	'model' => Openwod\ServiceAccounts\Models\ServiceAccount::class,
],

$svc = auth()->guard('svc')->user();

$svc->tokenCan('permission')