<?php
namespace App\Policies;use App\Models\Merchant;use App\Models\User;
class MerchantPolicy {public function before(User $u,string $ability):?bool{return $u->hasRole('admin')?true:null;}public function view(User $u,Merchant $m):bool{return $u->merchant_id===$m->id;}public function update(User $u,Merchant $m):bool{return $u->merchant_id===$m->id&&$u->hasRole('merchant');}}
