我的控制器这里有两个表名为storeData,第二个是dataFile。
public function storeData(Requests $request){
$data= new Data;
$data->name = $request->input('name');
$data->description = $request->input('description');
$data->save();
$datafile= new Datafile;
$datafile->data_id = $request->input('data_id');
$datafile->dataname= $request->input('$dataname');
$datafile->save();
return back;
}