1. Go to this page and download the library: Download xaviworks/modular-schema-ui 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/ */
xaviworks / modular-schema-ui example snippets
use XaviWorks\ModularSchemaUi\Forms\Form;
use XaviWorks\ModularSchemaUi\Forms\Fields\Email;
use XaviWorks\ModularSchemaUi\Forms\Fields\Text;
use XaviWorks\ModularSchemaUi\Resources\ResourceSchema;
final class UserSchema extends ResourceSchema
{
public function form(Form $form): Form
{
return $form->fields(
Text::make('name')->
use XaviWorks\ModularSchemaUi\Forms\Form;
use XaviWorks\ModularSchemaUi\Forms\Fields\Date;
use XaviWorks\ModularSchemaUi\Forms\Fields\Select;
use XaviWorks\ModularSchemaUi\Resources\UiSchema;
use XaviWorks\ModularSchemaUi\Tables\Columns\TextColumn;
use XaviWorks\ModularSchemaUi\Tables\Table;
final class ReservationUi extends UiSchema
{
public function createForm(Form $form): Form
{
return $form->fields(
Select::make('room_id')->
use XaviWorks\ModularSchemaUi\Tables\Action;
return $table->actions([
Action::make('edit')->url('/users/{id}'),
Action::make('delete')
->httpMethod('DELETE')
->url('/users/{id}')
->confirm('Delete this record?'),
]);
use Inertia\Inertia;
return Inertia::render('Users/Create', [
'form' => (new UserSchema)->formPayload(),
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.