Is it possible to disable editing, creating or both? #587
Unanswered
ralphjsmit
asked this question in
Help
Replies: 1 comment
-
Thanks to @danharrin, he gave me this solution in Discord. To disable create and delete, return Example class ListUsers extends ListRecords
{
public static $resource = UsersResource::class;
public function canCreate()
{
return false;
}
public function canDelete()
{
return false;
}
} To disable editing, add Example // UsersResource.php
public static function table(Table $table)
{
return $table
->columns([
Text::make('name'),
])
->filters([
//
])->recordActions([]);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone, I love the package. Every time I browse the docs, I discover something new. Awesome!
I have the question if it is possible to restrict editing, creating or both. I already tried removing it from the
routes()
function in a resource, but the buttons were still present (and an exception that the route was not found when you clicked it).Would be great if you could point out how to do this!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions