-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
- In the actions part, add condition around update and view method to not show it when the user is in the respective route. For example
Current
@can('update', $waste_collection)
<a class="actions__item zmdi zmdi-edit" href="{{ route('admin.waste-collections.edit', $waste_collection) }}" title="Edit">
<span>{{ __('Edit') }}</span>
</a>
@endcan
@can('view', $waste_collection)
<a class="actions__item zmdi zmdi-eye" href="{{ route('admin.waste-collections.show', $waste_collection) }}" title="View">
<span>{{ __('View') }}</span>
</a>
@endcan
Expected
@if (! request()->routeIs('admin.waste-collections.edit'))
@can('update', $waste_collection)
<a class="actions__item zmdi zmdi-edit" href="{{ route('admin.waste-collections.edit', $waste_collection) }}" title="Edit">
<span>{{ __('Edit') }}</span>
</a>
@endcan
@endif
@if (! request()->routeIs('admin.waste-collections.show'))
@can('view', $waste_collection)
<a class="actions__item zmdi zmdi-eye" href="{{ route('admin.waste-collections.show', $waste_collection) }}" title="View">
<span>{{ __('View') }}</span>
</a>
@endcan
@endif
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request