Refactor and enhance codebase: remove unused docblocks, adjust product search limits, and improve Nova resource visibility based on user roles. Update middleware imports and streamline query return types for better clarity and maintainability.
This commit is contained in:
1 parent
5c17c35741
commit
550ffea5c0
11 files changed
+44
-33
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace App\Nova\Resources\Ecommerce\Channel\Fields;
|
||||
|
||||
use Ebess\AdvancedNovaMediaLibrary\Fields\Images;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Laravel\Nova\Fields\DateTime;
|
||||
use Laravel\Nova\Fields\ID;
|
||||
use Laravel\Nova\Fields\Text;
|
||||
@@ -26,7 +27,8 @@ public static function make(): array
|
||||
|
||||
Text::make(__('User'), fn ($model) => $model->user?->fullname ?? '-'),
|
||||
|
||||
NovaSwitcher::make(__('Chatting'), 'chatting'),
|
||||
NovaSwitcher::make(__('Chatting'), 'chatting')
|
||||
->canSee(fn () => Auth::user()->hasRole(['admin', 'direktor'])),
|
||||
|
||||
DateTime::make(__('Created at'), 'created_at')
|
||||
->turkmenDate()
|
||||
|
||||
Reference in new issue
Block a user