From eb6888edda44a3eb23e18e53a3318038ae8ca90c Mon Sep 17 00:00:00 2001 From: kristi Date: Tue, 6 Aug 2024 01:51:16 -0400 Subject: [PATCH] wip --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c2cc12a0..0a841c2e 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,36 @@ Logo -Disabled features: +### **Disabled features:** * Profile editing (change on Adminpanelprovider.php) * Permission management for user roles (change on RoleResource.php) * User resource editing and deleting have been disabled (change on UserResource.php) * Hero resource editing and deleting have been disabled (change on HeroResource.php) +* SectionColors resource editing and deleting have been disabled (change on SectionColorResource.php) + +#### **To enable these features you need to comment the following functions on the desired resources:** + +``` +public static function canEdit(Model $record): bool +{ + return false; +} +public static function canDelete(Model $record): bool +{ + return false; +} +``` + +#### **You can also comment the can create function based on necessity of your app:** + +``` +public static function canCreate(): bool +{ + $recordExists = SectionColors::exists(); + + return ! $recordExists; +} +```

Witty workflow