PHP code example of cambosoftware / cambo-admin

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

    

cambosoftware / cambo-admin example snippets


return [
    'modules' => [
        'auth' => true,
        'users' => true,
        'roles' => true,
        'permissions' => true,
        'notifications' => true,
        'activity-log' => true,
        'dashboard' => true,
        'media' => true,
        'settings' => true,
        // ...
    ],

    'appearance' => [
        'name' => 'My Admin',
        'primary_color' => '#6366f1',
        'dark_mode' => 'auto',
    ],

    'routes' => [
        'prefix' => 'admin',
        'middleware' => ['web', 'auth', 'verified'],
    ],
];

use CamboSoftware\CamboAdmin\QueryBuilder\QueryBuilder;

class UserController extends Controller
{
    public function index()
    {
        return inertia('Users/Index', [
            'users' => QueryBuilder::for(User::class)
                ->columns(['id', 'name', 'email', 'created_at'])
                ->searchable(['name', 'email'])
                ->sortable(['name', 'created_at'])
                ->exportable(['csv', 'excel'])
                ->paginate(25)
        ]);
    }
}
bash
php artisan cambo:install --full
bash
php artisan cambo:install
bash
php artisan cambo:install --only=ui
bash
php artisan cambo:add notifications