PHP code example of silverbullet / api-token-laravel

1. Go to this page and download the library: Download silverbullet/api-token-laravel 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/ */

    

silverbullet / api-token-laravel example snippets

 php
'providers' => [
    ...
    Silverbullet\ApiTokenLaravel\Providers\ApiTokenServiceProvider::class
],
 bash
php artisan vendor:publish --provider="Silverbullet\ApiTokenLaravel\Providers\ApiTokenServiceProvider"
 bash
php artisan migrate
 bash
$ php artisan api-token:generate {name} {code?}
 bash
$ php artisan api-token:list
 bash
$ php artisan api-token:delete {id}
 php
Route::get('partner-products', function() {
    //
})->middleware('apitoken.auth:{service1}');