<?php
namespace App\Http\Requests\Admin;use Illuminate\Foundation\Http\FormRequest;
class MerchantRequest extends FormRequest {public function authorize():bool{return $this->user()?->hasRole('admin')??false;}public function rules():array{return ['name'=>['required','string','max:120'],'country_id'=>['required','exists:countries,id'],'contact_name'=>['nullable','string','max:120'],'contact_phone'=>['nullable','string','max:20'],'contact_email'=>['nullable','email','max:255'],'address'=>['nullable','string','max:1000'],'can_send'=>['required','boolean'],'can_receive'=>['required','boolean'],'per_txn_min_minor'=>['required','integer','min:0'],'per_txn_max_minor'=>['required','integer','gte:per_txn_min_minor'],'daily_limit_minor'=>['required','integer','min:0']];}}
