当前位置: 首页>>代码示例>>PHP>>正文


PHP User::whereNull方法代码示例

本文整理汇总了PHP中app\User::whereNull方法的典型用法代码示例。如果您正苦于以下问题:PHP User::whereNull方法的具体用法?PHP User::whereNull怎么用?PHP User::whereNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\User的用法示例。


在下文中一共展示了User::whereNull方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: assignRoleUserForm

 public function assignRoleUserForm($role_id)
 {
     $not_assigned_users = User::whereNull('role_id')->get();
     $role = Role::find($role_id);
     return view('backend.role.user_assign')->with('content_title', "Assign User")->with('not_assigned_users', $not_assigned_users)->with('role', $role)->with('module', $this->module);
 }
开发者ID:vampirethura,项目名称:modelvillage,代码行数:6,代码来源:RoleController.php

示例2: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     if (Auth::check() && $this->rolechucnangs && $this->rolechucnangs->Sua == 1) {
         $congviec = Congviec::findOrFail($id);
         $nguoinhans = User::where('role_id', '>', 2)->orderBy('name', 'desc')->get();
         $nguonphatsinhs = Danhmucnguonphatsinh::orderBy('name')->get();
         $tinhtrangcongviecs = Tinhtrangcongviec::orderBy('name')->get();
         $canbogiaos = $users = User::whereNull('users.deleted_at')->where('role_id', '>=', '3')->get();
         $getfiletralois = \DB::table('file_traloicongviecs')->where('congviec_id', $id)->get();
         $getcountups = \DB::table('file_traloicongviecs')->where('congviec_id', $id)->distinct()->select('stt')->get();
         $getusers = \DB::table('file_traloicongviecs')->where('congviec_id', $id)->distinct()->select('user_id')->get();
         return view('congviec.edit')->with(array('congviec' => $congviec, 'tinhtrangcongviecs' => $tinhtrangcongviecs, 'nguonphatsinhs' => $nguonphatsinhs, 'nguoinhans' => $nguoinhans, 'canbogiaos' => $canbogiaos, 'getcountups' => $getcountups, 'getfiletralois' => $getfiletralois, 'getusers' => $getusers, 'menus' => $this->menus));
     } else {
         return \Redirect::route('congviec.index')->with('message-error', 'Không có quyền truy cập');
     }
 }
开发者ID:thaigialai1987,项目名称:qlcv,代码行数:22,代码来源:CongviecController.php

示例3: showuser

 public function showuser()
 {
     $users = User::whereNull('users.deleted_at')->where('role_id', '>=', '3')->get();
     return response()->json($users);
 }
开发者ID:thaigialai1987,项目名称:qlcv,代码行数:5,代码来源:CongvandiController.php

示例4: getIndex

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function getIndex()
 {
     /*Get users*/
     $users = User::whereNull('deleted_at')->paginate(15);
     return View('admin.users.index', compact('users'));
 }
开发者ID:ndhungvu,项目名称:laravel-5,代码行数:11,代码来源:UserController.php

示例5: show

 /**
  * Display the specified resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function show()
 {
     $data = ['title' => 'Teleaus Admin Dashboard | All User', 'users' => User::whereNull('deleted_at')->get()];
     return view('dashboard.allUser')->with($data);
 }
开发者ID:minhajCSE,项目名称:teleaus-dev,代码行数:10,代码来源:UserController.php

示例6: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function edit($id)
 {
     if (Auth::check() && $this->rolechucnangs && $this->rolechucnangs->Sua == 1) {
         $cuochop = Cuochop::findOrFail($id);
         $phonghops = Danhmucphonghop::all();
         $canbogiaos = $users = User::whereNull('users.deleted_at')->where('role_id', '>=', '3')->get();
         $nguoinhans = User::where('role_id', '>', 2)->orderBy('name', 'desc')->get();
         $nguonphatsinhs = Danhmucnguonphatsinh::orderBy('name')->get();
         $tinhtrangcongviecs = Tinhtrangcongviec::orderBy('name')->get();
         $lanhdaos = Canbo::orderBy('name')->get();
         $giaoviecs = ['canbogiaos' => $canbogiaos, 'nguoinhans' => $nguoinhans, 'nguonphatsinhs' => $nguonphatsinhs, 'tinhtrangcongviecs' => $tinhtrangcongviecs];
         return view('cuochop.edit')->with(['cuochop' => $cuochop, 'giaoviecs' => $giaoviecs, 'lanhdaos' => $lanhdaos, 'phonghops' => $phonghops, 'menus' => $this->menus]);
     } else {
         return \Redirect::to('cuochop.index')->with('message-error', 'Không có quyền truy cập');
     }
 }
开发者ID:thaigialai1987,项目名称:qlcv,代码行数:22,代码来源:CuochopController.php

示例7: getNoRoleUser

 public static function getNoRoleUser()
 {
     $users = User::whereNull('role_id')->whereNull('deleted_at')->get();
     return $users;
 }
开发者ID:vampirethura,项目名称:modelvillage,代码行数:5,代码来源:User.php


注:本文中的app\User::whereNull方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。