Wirkhof
Wirkhof
Explore posts from servers
FFilament
Created by Wirkhof on 4/26/2024 in #❓┊help
How to allow HTML in Placeholder in Form?
OK, it seems that just changing the return type did the thing.
4 replies
FFilament
Created by Wirkhof on 4/18/2024 in #❓┊help
Unable to set checkbox default value to true
Hmm, perhaps it was because I haven't added the new field is_admin in the migration and Filament seems to need that to work. After migration it seems to be working I guess.
5 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
How to bring current record into canAccess() method code?
public static function canAccess(array $parameters = []): bool
{
dd($this->getRecord());
//return auth()->user()->id == 42;
}
public static function canAccess(array $parameters = []): bool
{
dd($this->getRecord());
//return auth()->user()->id == 42;
}
I will get:
Using $this when not in object context
Using $this when not in object context
How to get the record info inside the canAccess() function?
6 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
How to bring current record into canAccess() method code?
When I do this:
6 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
public static function canAccess(array $parameters = []): bool
{
return auth()->user()->id == 42;
}
public static function canAccess(array $parameters = []): bool
{
return auth()->user()->id == 42;
}
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
So, for Chatbots and Livebots here is what worked in EditUser.php file:
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
Thanks nevertheless. I appreciate your time and willingness to help.
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
A good docs would help me here, I agree.
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
It's from the docs
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
but it shows that error bool must be compatible. ...
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
public static function canAccess(): bool
{
return auth()->user()->id == 42;
}
public static function canAccess(): bool
{
return auth()->user()->id == 42;
}
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
I have tried
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
How would you do it with canAccess() on EditUser.php and allow access only if you are user with id 42?
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
What parameters?
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
It wants some array of parameters
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
What should I put in canAccess(<<here>>) ?
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
I am getting Declaration of EditUser::canAccess(): bool must be compatible with Page::canAccess(array $parameters = []): bool
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
I can hide buttons and stuff but they can still enter the url directly
33 replies
FFilament
Created by Wirkhof on 4/15/2024 in #❓┊help
Redirect when entering a certain edit page in resource
I need to restrict users to edit other users based on a custom logic
33 replies