PHP code example of accelade / schemas

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

    

accelade / schemas example snippets


use Accelade\Schemas\Components\Tabs;
use Accelade\Schemas\Components\Tab;

$tabs = Tabs::make()
    ->tabs([
        Tab::make('General')
            ->icon('<svg>...</svg>')
            ->schema([...]),
        Tab::make('Advanced')
            ->badge('3')
            ->schema([...]),
    ]);

use Accelade\Schemas\Components\Wizard;
use Accelade\Schemas\Components\Step;

$wizard = Wizard::make()
    ->steps([
        Step::make('Account')
            ->icon('<svg>...</svg>')
            ->schema([...]),
        Step::make('Profile')
            ->schema([...]),
        Step::make('Review')
            ->schema([...]),
    ])
    ->nextLabel('Continue')
    ->submitLabel('Create Account');

// Simple: 2 columns
Grid::make(2);

// Responsive: 1 on mobile, 2 on sm, 3 on lg
Grid::make(['default' => 1, 'sm' => 2, 'lg' => 3]);

use Accelade\Schemas\Components\Section;
use Accelade\Schemas\Components\Grid;
use Accelade\Schemas\Components\Tabs;
use Accelade\Schemas\Components\Tab;

$section = Section::make('settings')
    ->heading('Application Settings')
    ->description('Configure your app')
    ->icon('<svg>...</svg>')
    ->collapsible()
    ->collapsed()
    ->columns(2)
    ->schema([
        Grid::make(2)->schema([...]),
    ]);

// In Blade:
{!! $section->render() !!}