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


use App\Models\User;
use October\Amber\Widgets\Form;

public function edit($id)
{
    $user = User::findOrFail($id);

    $form = Form::make([
        'model' => $user,
        'fields' => '~/resources/amber/user/fields.yaml',
    ]);

    return view('users.edit', ['form' => $form]);
}
bash
php artisan vendor:publish --tag=amber-assets