此CreatePost.php
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CreatePost extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'title' => 'required|string',
'content' => 'required',
];
}
}
有人请帮助我吗?类App \ Http \ Request \ CreatePost不存在 谢谢
答案 0 :(得分:0)
您需要在顶部导入模型 例如
use App\Supplier;