File "UpdateStoreLocationRequest.php"

Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Http/Requests/Admin/UpdateStoreLocationRequest.php
File size: 975 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace App\Http\Requests\Admin;

use Gate;
use Illuminate\Foundation\Http\FormRequest;

class UpdateStoreLocationRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return Gate::allows('store_location_edit');
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, mixed>
     */
    public function rules()
    {
        return [
            'title' => [
                'required',
                'string',
                'max:50',
            ],
            'address' => [
                'required',
                'string',
            ],
            'state_id' => [
                'required',
                'exists:state_sales_taxes,id',
            ],
            'status' => [
                'required',
                'in:0,1',
            ],
        ];
    }
}