public function index()
 {
     $blogPostsCount = $this->post->criteria(new PostType('blog'))->count();
     $workPostsCount = $this->post->criteria(new PostType('work'))->count();
     $usersCount = $this->user->count();
     return view('backend.dashboard.index', compact('blogPostsCount', 'workPostsCount', 'usersCount'));
 }
Example #2
0
 public function getLatestUsers()
 {
     $rep = new UsersRepository();
     return response()->json($rep->GetLatestUsers());
 }
 /**
  * Returns a listing of all users.
  */
 public function index()
 {
     $users = $this->usersRepository->getAll();
     return $this->respondOk($users);
 }
Example #4
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function destroy($id)
 {
     $this->repository->delete($id);
     return redirect()->route('admin.users.index');
 }
 public function index()
 {
     $user = $this->user->find(Auth::id());
     return view('auth.profile', compact('user'));
 }
Example #6
0
 public function getUserById()
 {
     $id = Input::get('id');
     $rep = new UsersRepository();
     return response()->json($rep->GetUserById($id));
 }