1. Go to this page and download the library: Download rhaima/voltpanel 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/ */
rhaima / voltpanel example snippets
use App\Panels\AdminPanel;
use Rhaima\VoltPanel\Facades\VoltPanel;
public function boot(): void
{
VoltPanel::register(new AdminPanel());
}
use Rhaima\VoltPanel\Authorization\Traits\HasRoles;
class User extends Authenticatable
{
use HasRoles;
}
use Rhaima\VoltPanel\Resources\Resource;
use Rhaima\VoltPanel\Forms\Form;
use Rhaima\VoltPanel\Tables\Table;
use Rhaima\VoltPanel\Forms\Components\TextInput;
use Rhaima\VoltPanel\Forms\Components\RichEditor;
use Rhaima\VoltPanel\Forms\Components\Select;
use Rhaima\VoltPanel\Tables\Columns\TextColumn;
use Rhaima\VoltPanel\Tables\Columns\BadgeColumn;
use Rhaima\VoltPanel\Tables\Columns\DateColumn;
class PostResource extends Resource
{
protected static ?string $model = Post::class;
public static function form(Form $form): Form
{
return $form->schema([
TextInput::make('title')->