PHP code example of larajax / amber

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

    

larajax / amber example snippets


// app/Controllers/UsersController.php
$list = Lists::make(
    model: new User,
    columns: '~/resources/ui/user/columns.yaml',
    recordsPerPage: 10,
);

return view('users.index', ['list' => $list]);
bash
composer install
cp .env.example .env
php artisan key:generate
touch database/database.sqlite
php artisan migrate --seed
php artisan serve
blade
{{-- resources/views/users/index.blade.php --}}
{{ $list }}