app/Http/Requests/EntryRequest.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|max:10',
            'tel' => 'required|max:13',
            'email' => 'required|email',
            'area' => 'required|in:北海道,東北,関東,中部,近畿,中国,四国,九州',
            'age' => 'required|in:出産前,0歳〜6歳,7歳〜11歳,8歳〜15歳,16歳〜20歳,21歳〜',
            'type' => 'required|in:カウンセリング,三者面談,引き渡し希望,一時預かり,体験入学,短期入学,長期入学,未定',
            'image' => 'required', 
            'hp' => 'required',                  
            'body' => 'required|max:1000'
        ];
    }
public function rules ( ) { return [ 'name' => 'required|max:10' , 'tel' => 'required|max:13' , 'email' => 'required|email' , 'area' => 'required|in:北海道,東北,関東,中部,近畿,中国,四国,九州', 'age' => 'required|in:出産前,0歳〜6歳,7歳〜11歳,8歳〜15歳,16歳〜20歳,21歳〜', 'type' => 'required|in:カウンセリング,三者面談,引き渡し希望,一時預かり,体験入学,短期入学,長期入学,未定', 'image' => 'required' , 'hp' => 'required' , 'body' => 'required|max:1000' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .
//=>ダブルアロー演算子は値を代入する //