ldc-qrcollector-back/app/Http/Requests/Bo/Services/StoreServiceRequest.php

32 lines
615 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Http\Requests\Bo\Services;
use Illuminate\Foundation\Http\FormRequest;
class StoreServiceRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize()
{
return auth('backend')->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'string|max:255|required',
'brand_id' => 'required|exists:brands,id'
];
}
}