Filament Multi Tenant app CreateOptionForm
Hello,
I am developing my multi-tenant app and want to use quick add using createOptionForm.
This below is my create option forms.
this works perfectly fine but I dont want to show the company_id field. When I also give property
it throws me error that company_id constraint cannot be null.
Can you point me to the right direction?
Thanks a lot in advance
Solution:Jump to solution
It was like the first line below. But in Laravel docs, it is like the second line "with brackets"
```php
#[ObservedBy(TitleObserver::class)]
#[ObservedBy([TitleObserver::class])]...
4 Replies
And I have also tried observers but still get company_id not null constraint
Blind guess: maybe your company_id field is not in the $fillable array of Title model?
I'm using Model::unguard() for development purposes in AppServiceProvider
Yee. Found the problem.
Solution
It was like the first line below. But in Laravel docs, it is like the second line "with brackets"