| 123456789101112131415161718192021222324 |
- <?php
- namespace App\Policies;
- use App\CustomerLog;
- use App\User;
- use Illuminate\Auth\Access\HandlesAuthorization;
- class CustomerLogPolice
- {
- use HandlesAuthorization;
- protected $cache_key = 'customerLog_update_auth_';
- public function update(User $user, CustomerLog $customerLog): bool
- {
- return (int)$user->id === (int)$customerLog->user_id;
- }
- public function destroy(User $user, CustomerLog $customerLog)
- {
- return (int)$user->id === (int)$customerLog->user_id;
- }
- }
|