本文整理汇总了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);
}
示例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');
}
}
示例3: showuser
public function showuser()
{
$users = User::whereNull('users.deleted_at')->where('role_id', '>=', '3')->get();
return response()->json($users);
}
示例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'));
}
示例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);
}
示例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');
}
}
示例7: getNoRoleUser
public static function getNoRoleUser()
{
$users = User::whereNull('role_id')->whereNull('deleted_at')->get();
return $users;
}