app/Api/V1/Requests/WarehouseRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'name' => 'required|string',
            'state_id' => 'required|exists:states,id',
            'city_id' => 'required|exists:cities,id',
            'address_line_1' => 'required|string',
        ];
    }
public function rules ( ) { return [ 'name' => 'required|string' , 'state_id' => 'required|exists:states,id' , 'city_id' => 'required|exists:cities,id' , 'address_line_1' => 'required|string' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .