PHP code example of nimbus / laravel

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

    

nimbus / laravel example snippets


'providers' => [
    'B' => [
        'url' => 'https://b.test',
        'jwks_url' => 'https://b.test/.well-known/nimbus-jwks.json',
    ],
],

// In Controller
use Nimbus\Laravel\Facades\Nimbus;

public function index() {
    return Nimbus::render('B::Customers/List', [
        'filters' => request('filters'),
    ]);
}

// Create
$result = Nimbus::store('B::customers', [
    'name' => 'New Customer',
    'email' => '[email protected]',
]);

// Update
$result = Nimbus::update('B::customers', $id, $data);

// Delete
$result = Nimbus::destroy('B::customers', $id);

use Nimbus\Laravel\Facades\Nimbus;

Route::get('/customers', fn() => Nimbus::render('B::Customers/List'));
Route::post('/customers', fn() => Nimbus::store('B::customers', request()->all()));

// routes/nimbus.php
Route::nimbusComponent('Customers/List', [CustomerController::class, 'index']);
Route::nimbusResource('customers', CustomerController::class);
bash
composer nimbus:install
php artisan nimbus:jwt-generate