src/Templates/CRUD/CreateRequest.txt
<?php
namespace _namespace_request_;
use Auth;
use Illuminate\Foundation\Http\FormRequest;
use _namespace_model_\_camel_case_;
class _camel_case_CreateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
if (Auth::user()) {
return true;
}
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return _camel_case_::$rules;
}
}