F
Filamentβ€’10mo ago
hxnnxs

Filament\Forms\ComponentContainer::Filament\Forms\Concerns\{closure}(): Argument #1 ($component) mus

When I try to make the Return button to the authorization page, I get this error. Here is the code:

use App\Models\Company;
use Filament\Actions\Action;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Pages\Tenancy\RegisterTenant;

class RegisterCompany extends RegisterTenant
{
public static function getLabel(): string
{
return 'Create company';
}
public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name')
->required()
->placeholder('FinTrack LTD.')
->minLength(2)
->maxLength(20)
->prefixIcon('heroicon-o-home')
->unique(),
TextInput::make('short_name')
->required()
->prefixIcon('heroicon-o-home')
->placeholder('FT LTD.')
->minLength(2)
->maxLength(10)
->unique(),
Select::make('type')
->required()
->options([
'General' => 'General',
'Simplified' => 'Simplified',
'Patent' => 'Patent'
]),
Action::make('Auth')
->url(route('filament.dashboard.auth.login')),
]);
}

use App\Models\Company;
use Filament\Actions\Action;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Pages\Tenancy\RegisterTenant;

class RegisterCompany extends RegisterTenant
{
public static function getLabel(): string
{
return 'Create company';
}
public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name')
->required()
->placeholder('FinTrack LTD.')
->minLength(2)
->maxLength(20)
->prefixIcon('heroicon-o-home')
->unique(),
TextInput::make('short_name')
->required()
->prefixIcon('heroicon-o-home')
->placeholder('FT LTD.')
->minLength(2)
->maxLength(10)
->unique(),
Select::make('type')
->required()
->options([
'General' => 'General',
'Simplified' => 'Simplified',
'Patent' => 'Patent'
]),
Action::make('Auth')
->url(route('filament.dashboard.auth.login')),
]);
}
2 Replies
hxnnxs
hxnnxsOPβ€’10mo ago
help me pls 😊
Tieme
Tiemeβ€’10mo ago
What is the complete error? And also please change the title to a normal one an past the error or flare url in you question
Want results from more Discord servers?
Add your server