| Current Path : /var/www/html/LLCF-APP/app/Http/Requests/ |
| Current File : /var/www/html/LLCF-APP/app/Http/Requests/VoucherExpenseFormRequest.php |
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class VoucherExpenseFormRequest extends FormRequest
{
public function authorize(): bool
{
return auth()->guard('admin')->check();
}
public function rules(): array
{
$id = $this->route('id');
return [
'title' => 'required|string|max:255|unique:voucher_expenses,title,' . $id,
];
}
public function attributes(): array
{
return [
'title' => 'voucher expense title',
];
}
}