摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>模板继承@yield('title')</title> <style> .header{ width: 1000px; height:150px; margin 阅读全文
posted @ 2016-10-19 17:09 Yxh_blogs 阅读(531) 评论(0) 推荐(0) 编辑
摘要: public function query(){ //新增数据 //$bool = DB::table('wd_user')->insert(['username'=>'jack']); //dd($bool); //新增数据并且获取到自增id //$id = DB::table('wd_user' 阅读全文
posted @ 2016-10-19 17:04 Yxh_blogs 阅读(592) 评论(0) 推荐(0) 编辑
摘要: public function orm(){ //查询表的所有记录 //$user = Admin::all(); //dd($user); //查询某一条记录 //$user = Admin::find(2); //dd($user); //findOrFail() 根据主键查找,如果没有找到就抛 阅读全文
posted @ 2016-10-19 17:04 Yxh_blogs 阅读(6670) 评论(0) 推荐(0) 编辑
摘要: <?phpnamespace App;use Illuminate\Database\Eloquent\Model;class Admin extends Model{ //指定表名 protected $table = 'wd_user'; //指定允许批量复制的字段 protected $fil 阅读全文
posted @ 2016-10-19 17:02 Yxh_blogs 阅读(1290) 评论(0) 推荐(0) 编辑
摘要: //路由中输出视图Route::get('/', function () { return view('welcome');});//get路由请求Route::get('get',function(){ return 'get路由请求';});//post路由请求Route::post('post 阅读全文
posted @ 2016-10-19 17:01 Yxh_blogs 阅读(870) 评论(0) 推荐(0) 编辑