laravel 和 tp的区别
https://www.cnblogs.com/xiaoyantongxue/p/15442844.html
laravel 数据库储存的时间字段 created_at updated_at deleted_at(datetime,timestamp) tp create_time(int)
查询数据一条为first() find()
路有跳转 return redirect()或者 return redirect()->route()|url() 成功跳转 $this->success(); 失败跳转 $this->error(); return redirect()->send()
html 提交路由 {{url(' ')}}|{{route( ' ')}} {:url(' ')}
视图创建views/目录/PHP File/index.balde
laravel 视图传参
$first=Day19::find($id);
return view('day19.update',compact('first'));
tp传参
$this->assign('data',$data);
$this->assign('word',$word);
return $this->fetch();
eturn $this->display( )|fetch() 常用方法:$this->fetch()渲染模板,$this->display()渲染内容,$this->assign()模板赋值,$this->engine引擎
laravel 路由传参: Route::get('day19/update/{id}','ExamController@update')->name('day19.update'); tp 路由传参: Route::get('day19/update/:id')