Closed jlevers closed 3 years ago
Hi, @jlevers. The CRUD build package relies on eloquent models where view or update permissions are granted by specifying a policy. To hide them, you need to create a policy for your model. For example:
namespace App\Policies;
use App\Models\User;
use App\Models\Post;
use Illuminate\Auth\Access\HandlesAuthorization;
class PostPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can update the post.
*
* @param User $user
* @param Post $post
* @return mixed
*/
public function update(User $user, Post $post)
{
return true;
}
}
You can find more information on the package page and on the laravel documentation page.
Gotcha -- that makes sense. Thank you!
Thanks for all the great work on this project!
Is there a way to hide the default
View
andUpdate
actions on each record in the list view? Currently it seems like the only real way to override anything in theListScreen
is to create a full custom screen.