PHP code example of laravilt / schemas

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

    

laravilt / schemas example snippets


use Laravilt\Schemas\Components\Section;
use Laravilt\Forms\Components\TextInput;

Section::make('Product Information')
    ->description('Basic product details')
    ->icon('Package')
    ->columns(2)
    ->collapsible()
    ->schema([
        TextInput::make('name')->

use Laravilt\Schemas\Components\Tabs;
use Laravilt\Schemas\Components\Tab;

Tabs::make('product_tabs')
    ->tabs([
        Tab::make('details')
            ->label('Details')
            ->icon('FileText')
            ->schema([...]),

        Tab::make('pricing')
            ->label('Pricing')
            ->icon('DollarSign')
            ->badge(fn ($record) => $record?->has_discount ? 'Sale' : null)
            ->schema([...]),
    ]);

use Laravilt\Schemas\Components\Wizard;
use Laravilt\Schemas\Components\Step;

Wizard::make()
    ->steps([
        Step::make('account')
            ->label('Account')
            ->icon('User')
            ->schema([...]),

        Step::make('profile')
            ->label('Profile')
            ->icon('Settings')
            ->schema([...]),
    ])
    ->skippable();
bash
php artisan make:schema ProductSchema