Meymink
Section - must be of type string, array given
Nevermind, problem solved!
Turned out i had published Filament's resources files into (project)/resources/views/vendor/filament which were outdated after changes were made to the Section component in version 3.1
After deleting/updating them, the pages worked again.
2 replies
Return error from ->action
You could create a Laravel rule class (read laravel documentation on this)
Add ->rule(YourRuleClass)
And then do the rest of the functionality in your ->action().
This way the rule/validation is executed before performing the action.
Note: you can do a validation in your rule and even display an error message in the form without customization the form.
14 replies
Version 3 with Tenancy + Spatie's Permission package
https://spatie.be/docs/laravel-permission/v6/basic-usage/teams-permissions
When creating a role you can pass the team_id as an optional parameter
The second option is what you are looking for as its a role created for the specified team (id.)
Hence why it can have the same name on different teams because different teams can have a role with a name that some other teams may have already used.
3 replies
Login page parameters
Problem solved, thank you!
Livewire doc:
Mount
In a standard PHP class, a constructor (construct()) takes in outside parameters and initializes the object's state. However, in Livewire, you use the mount() method for accepting parameters and initializing the state of your component.
Livewire components don't use construct() because Livewire components are re-constructed on subsequent network requests, and we only want to initialize the component once when it is first created.
4 replies