Skip to content

Instantly share code, notes, and snippets.

@alixcan
Created May 31, 2021 09:54
Show Gist options
  • Select an option

  • Save alixcan/a65da43b3fc5fd6a2d427a8098ed9cf4 to your computer and use it in GitHub Desktop.

Select an option

Save alixcan/a65da43b3fc5fd6a2d427a8098ed9cf4 to your computer and use it in GitHub Desktop.
Disable Laravel Nova Create / Edit / Delete Feature on Resources.
<?php
namespace App\Traits;
trait DisableNovaEntries
{
public static function authorizedToCreate(Request $request)
{
return false;
}
public function authorizedToDelete(Request $request)
{
return false;
}
public function authorizedToUpdate(Request $request)
{
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment