<?php
namespace App\Filament\Pages;
use Filament\Pages\Page;
use Illuminate\Support\Facades\Auth;
use BackedEnum;
use Filament\Schemas\Schema;
use Filament\Forms\Components\TextInput;
class Settings extends Page
{
protected string $view = 'filament.pages.settings';
protected static ?string $navigationLabel = '//';
protected static ?string $title = '//';
protected ?string $subheading = '//';
protected static string|BackedEnum|null $navigationIcon = 'heroicon-s-wrench-screwdriver';
public static function canAccess(): bool
{
return !empty(Auth::user()->organization_id);
}
public function myCustomFunction(): Schema
{
// Should I put my code here and return a Schema object?
$schema = new Schema();
return $schema
->components([
TextInput::make('name')
->label("test")
->required()
]);
}
}
<?php
namespace App\Filament\Pages;
use Filament\Pages\Page;
use Illuminate\Support\Facades\Auth;
use BackedEnum;
use Filament\Schemas\Schema;
use Filament\Forms\Components\TextInput;
class Settings extends Page
{
protected string $view = 'filament.pages.settings';
protected static ?string $navigationLabel = '//';
protected static ?string $title = '//';
protected ?string $subheading = '//';
protected static string|BackedEnum|null $navigationIcon = 'heroicon-s-wrench-screwdriver';
public static function canAccess(): bool
{
return !empty(Auth::user()->organization_id);
}
public function myCustomFunction(): Schema
{
// Should I put my code here and return a Schema object?
$schema = new Schema();
return $schema
->components([
TextInput::make('name')
->label("test")
->required()
]);
}
}