Created
May 31, 2021 09:54
-
-
Save alixcan/a65da43b3fc5fd6a2d427a8098ed9cf4 to your computer and use it in GitHub Desktop.
Disable Laravel Nova Create / Edit / Delete Feature on Resources.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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