PHP code example of inertia-studio / laravel-adapter

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

    

inertia-studio / laravel-adapter example snippets


class Users extends Module
{
    protected static string $model = User::class;

    public static function form(Form $form): Form
    {
        return $form->schema([
            Layout::section('User Information')->columns(2)->schema([
                Field::text('name')-> table(Table $table): Table
    {
        return $table->columns([
            Column::text('name')->searchable()->sortable(),
            Column::badge('role')->colors(['admin' => 'danger']),
            Column::date('created_at')->label('Joined'),
        ]);
    }
}