Class App \ Http \ Request \ CreatePost不存在

问题描述 投票:0回答:1

此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不存在谢谢

php laravel-5
1个回答
0
投票

您需要在顶部导入模型例如

use App\Supplier;
© www.soinside.com 2019 - 2024. All rights reserved.