PHP code example of zeeshanmushtq / apinexa

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

    

zeeshanmushtq / apinexa example snippets




return [
    'name' => 'Create Job',
    'method' => 'POST',
    'endpoint' => '/jobs',
    'auth' => true,
    'roles' => ['admin', 'employer'],
    'scopes' => ['jobs:create'],
    'payload' => [
        'title' => '

Route::middleware(['api', 'apinexa.key'])->group(base_path('routes/api.php'));

use ZeeshanMushtaq\ApiNexa\Contracts\ApiKeyManagerContract;

$key = app(ApiKeyManagerContract::class)->create(
    name: 'Partner Integration',
    mode: 'live',
    scopes: ['jobs:create'],
    permissions: ['POST:/jobs'],
);
bash
php artisan apinexa:scan
bash
php artisan apinexa:docs