Lim
Lim
FFilament
Created by Lim on 3/14/2024 in #❓┊help
How to save relationship first
return $form
->schema([
Forms\Components\TextInput::make('integration_name') //this needs to be save last
->required()
->maxLength(100)
->columnSpanFull(),
Forms\Components\Fieldset::make('Shopify') //this needs to be save first
->relationship('tokens_shopify')
->schema([
Forms\Components\TextInput::make('url')
->label('URL')
->required()
->maxLength(255),
Forms\Components\TextInput::make('access_token')
->label('Access Token')
->required()
->maxLength(255),
Forms\Components\TextInput::make('api_key')
->label('API Key')
->required()
->maxLength(255),
Forms\Components\TextInput::make('api_secret')
->label('API Secret')
->required()
->maxLength(255),
])->columnSpan(1),

Forms\Components\Fieldset::make('eSuite') //this needs to be save first
->relationship('tokens_esuite')
->schema([
Forms\Components\TextInput::make('domain')
->required()
->maxLength(100),
Forms\Components\TextInput::make('database')
->required()
->maxLength(100),
Forms\Components\TextInput::make('password')
->required()
->maxLength(255),
])->columnSpan(1),
]);
}
return $form
->schema([
Forms\Components\TextInput::make('integration_name') //this needs to be save last
->required()
->maxLength(100)
->columnSpanFull(),
Forms\Components\Fieldset::make('Shopify') //this needs to be save first
->relationship('tokens_shopify')
->schema([
Forms\Components\TextInput::make('url')
->label('URL')
->required()
->maxLength(255),
Forms\Components\TextInput::make('access_token')
->label('Access Token')
->required()
->maxLength(255),
Forms\Components\TextInput::make('api_key')
->label('API Key')
->required()
->maxLength(255),
Forms\Components\TextInput::make('api_secret')
->label('API Secret')
->required()
->maxLength(255),
])->columnSpan(1),

Forms\Components\Fieldset::make('eSuite') //this needs to be save first
->relationship('tokens_esuite')
->schema([
Forms\Components\TextInput::make('domain')
->required()
->maxLength(100),
Forms\Components\TextInput::make('database')
->required()
->maxLength(100),
Forms\Components\TextInput::make('password')
->required()
->maxLength(255),
])->columnSpan(1),
]);
}
3 replies
FFilament
Created by Lim on 3/7/2024 in #❓┊help
Save relationship first before creating model
@Hussain4real is there a reason why I cant get the other inputs?
10 replies
FFilament
Created by Lim on 3/5/2024 in #❓┊help
filament:install --panels WARN
If
AdminServiceProvider
AdminServiceProvider
is already and and still encountering some errors when creating a filament user Try the fix below: From the
AdminServiceProvider->panel()
AdminServiceProvider->panel()
Add the
default()
default()
Here is a sample code
public function panel(Panel $panel): Panel
{
return $panel
->default() //added this
->registration()
->login() //add this if there is an error related to Route[login]
->id('admin')
->path('admin')
->colors([
'primary' => Color::Amber,
])
...
}
public function panel(Panel $panel): Panel
{
return $panel
->default() //added this
->registration()
->login() //add this if there is an error related to Route[login]
->id('admin')
->path('admin')
->colors([
'primary' => Color::Amber,
])
...
}
Thank you
4 replies