Form Data 유효성 검사
Controller.php use Illuminate\Http\Request; use Illuminate\Support\Facades\Validator; public function test(Request $request) { $validator = Validator::make($request->all(), [ 'in_name'=>'required', 'in_hp'=>'required', ]); if ($validator->fails()) { return response()->json(array('msg'=> 'Missing required items'), 400); } } blade.php