• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Facades\Redirect类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Illuminate\Support\Facades\Redirect的典型用法代码示例。如果您正苦于以下问题:PHP Redirect类的具体用法?PHP Redirect怎么用?PHP Redirect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: handleFbCallback

 public function handleFbCallback()
 {
     $fb_user = Socialite::driver('facebook')->user();
     $user = User::firstOrCreate(['firstname' => $fb_user->user['first_name'], 'lastname' => $fb_user->user['last_name'], 'email' => $fb_user->email]);
     Auth::login($user, true);
     return Redirect::to('/books');
 }
开发者ID:a1ex7,项目名称:librauth,代码行数:7,代码来源:AuthController.php


示例2: logout

 public function logout()
 {
     $seguranca = new DPRFSeguranca(config("PRF.siglaSistema"), config("PRF.producao"));
     $seguranca->auditoria(Auth::user()->cpf, "LOGOUT", "Logout", array());
     Auth::logout();
     return Redirect::to("/");
 }
开发者ID:vlamirc,项目名称:arquetipophp,代码行数:7,代码来源:LoginController.php


示例3: update

 public function update()
 {
     $profile = Profile::where('user_id', Auth::user()->id)->first();
     $profile->fill(Input::all());
     $profile->save();
     return Redirect::to("/edit_profile");
 }
开发者ID:Volkan61,项目名称:begreat,代码行数:7,代码来源:ProfileController.php


示例4: logar

 public function logar(Request $request)
 {
     $regras = array('email' => 'required|string', 'password' => 'required');
     $mensagens = array('required' => 'O campo :attribute deve ser preenchido.');
     $this->validate($request, $regras, $mensagens);
     $email = $request['email'];
     $senha = $request['password'];
     $condicao = ['email' => $email];
     $remember = !empty($request['remember']) ? true : false;
     if (Auth::attempt(['email' => $email, 'password' => $senha], $remember)) {
         if ($this->authorize('logar', $email, $senha)) {
             return Redirect::action('LoginController@index');
         }
     }
     //        if(!empty($usuario) && Hash::check($senha,$usuario->password))
     //        {
     //                Auth::loginUsingId($usuario->id);
     //
     //            if($this->authorize('logar',$email,$senha))
     //            {
     //                return redirect('Empresa');
     //            }
     //        }
     return redirect()->back()->withErrors('Usuário inválido.');
 }
开发者ID:renanpupin,项目名称:brasilspot,代码行数:25,代码来源:LoginController.php


示例5: destroy

 public function destroy($id)
 {
     $user = $this->model->findOrFail($id);
     $this->userRepository->deleteUser($user);
     flash()->success(trans('LaravelAdmin::laravel-admin.userDeleted'));
     return Redirect::back();
 }
开发者ID:shinichi81,项目名称:laravel-admin,代码行数:7,代码来源:UsersController.php


示例6: restore

 public function restore($id)
 {
     $specificUser = User::withTrashed()->find($id);
     $specificUser->restore();
     $users = User::where('admin1_user0', '=', 0)->withTrashed()->get();
     return Redirect::to('dashboard')->with('users', $users);
 }
开发者ID:jimpeeters,项目名称:Win4LifeBonus,代码行数:7,代码来源:UserController.php


示例7: store

 public function store(LocationRequest $request)
 {
     $location = Location::create($request->all());
     Session::flash('success', true);
     Session::flash('message', 'Aðgerð tókst: Ný staðsetning');
     return Redirect::back();
 }
开发者ID:birgirob,项目名称:TiSDaV,代码行数:7,代码来源:LocationController.php


示例8: select

 public function select($ticketId, $commentId)
 {
     $ticket = $this->ticketRepository->findOrFail($ticketId);
     $this->authorize('selectResource', $ticket);
     $ticket->assignResource($commentId);
     return Redirect::back();
 }
开发者ID:resand,项目名称:teachme,代码行数:7,代码来源:TicketsController.php


示例9: switchLang

 public function switchLang($lang)
 {
     if (array_key_exists($lang, Config::get('languages'))) {
         Session::set('applocale', $lang);
     }
     return Redirect::back();
 }
开发者ID:Ristop,项目名称:valgeranna,代码行数:7,代码来源:LanguageController.php


示例10: postIndex

 public function postIndex()
 {
     $imagem = Input::file('imagem');
     if (is_null($imagem)) {
         throw new Exception('Você não selecionou um arquivo');
     }
     $destinationPath = public_path() . DIRECTORY_SEPARATOR . 'uploads';
     $filename = date('YmdHis') . '_' . $imagem->getClientOriginalName();
     if ($imagem->move($destinationPath, $filename)) {
         //Load view laravel paths
         $paths = Config::get('view.paths');
         //Load file view
         $file = $paths[0] . DIRECTORY_SEPARATOR . Input::get('view') . '.blade.php';
         $html = file_get_contents($file);
         //Init crawler
         $crawler = new HtmlPageCrawler($html);
         //Set filter
         $filter = '#' . Input::get('id');
         //Edit node
         $crawler->filter($filter)->setAttribute('src', '/uploads/' . $filename);
         $newHTML = html_entity_decode($crawler->saveHTML());
         $newHTML = str_replace('%7B%7B', '{{', $newHTML);
         $newHTML = str_replace('%7D%7D', '}}', $newHTML);
         $newHTML = str_replace('%24', '$', $newHTML);
         $newHTML = str_replace('%20', ' ', $newHTML);
         $newHTML = str_replace('%7C', '|', $newHTML);
         //write file
         file_put_contents($file, $newHTML);
         return Redirect::back()->with('alert', 'Banner enviado com sucesso!');
     }
 }
开发者ID:jansenfelipe,项目名称:laraeditable,代码行数:31,代码来源:LaraimgeditableController.php


示例11: handle

 /**
  * Handle an incoming request, check to see if we have a redirect in place for the requested URL
  * and then redirect if we do have a match
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     // Get the full URL that has been requested, minus the protocol
     $full_url = str_replace($request->getScheme() . "://", "", $request->url());
     // Check for any results matching the full domain request
     $results = Redirect::where("type", "domain")->where("from", $full_url)->where("status", "active");
     if ($results->exists()) {
         // Get the first result back
         $redirect = $results->first();
         // Grab the URL before we increment
         $url = $redirect->to;
         // Increment the hit count
         $redirect->increment('hits');
         // Redirect off to where we're going
         return RedirectFacade::to($url);
     }
     // Check for any results matching the path only
     $results = Redirect::where("type", "path")->where("from", "/" . $request->path())->where("status", "active");
     // If a redirect exists for this, process it and redirect
     if ($results->exists()) {
         // Get the first result back
         $redirect = $results->first();
         // Grab the URL before we increment
         $url = $redirect->to;
         // Increment the hit count
         $redirect->increment('hits');
         // Redirect off to where we're going
         return RedirectFacade::to($url, 301);
     }
     // By default, continue afterwards and bail out
     return $next($request);
 }
开发者ID:ssx,项目名称:threeohone,代码行数:40,代码来源:CheckForRedirect.php


示例12: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(CreateTratamientoRequest $request)
 {
     $tratamiento = Tratamiento::create($request->all());
     $message = $tratamiento->nombre_tratamiento . ' fue creado correctamente';
     Session::flash('message', $message);
     return Redirect::route('admin.tratamiento.index');
 }
开发者ID:panxox1323,项目名称:Oral_Plus2,代码行数:13,代码来源:TratamientoController.php


示例13: login

 protected function login()
 {
     if (auth()->attempt(array('email' => Input::get('email'), 'password' => Input::get('password')), true) || auth()->attempt(array('name' => Input::get('email'), 'password' => Input::get('password')), true)) {
         return Redirect::intended('/');
     }
     return back()->withInput()->with('message', 'Неверное имя пользователя и/или пароль!');
 }
开发者ID:Anatoly38,项目名称:proj01.laravel,代码行数:7,代码来源:AuthController.php


示例14: TambahJadwal

 public function TambahJadwal()
 {
     $rules = array('unit_id' => 'required', 'kategori' => 'required', 'tglstart' => 'required', 'tglases' => 'required', 'tglfinish' => 'required', 'detail' => 'required');
     $messages = array('unit_id.required' => 'Nama Jabatan Harus Terisi', 'kategori.required' => 'Kategori Harus Dipilih', 'tglstart.required' => 'Tanggal Mulai Harus Terisi', 'tglases.required' => 'Tanggal Asessment Harus Terisi', 'tglfinish.required' => 'Tanggal Selesai Harus Terisi', 'detail.required' => 'Detail Harus terisi');
     $validasi = validator::make(Input::all(), $rules, $messages);
     if ($validasi->fails()) {
         return Redirect::back()->withErrors($validasi)->withInput();
     } else {
         $kat = Input::get('kategori');
         if ($kat == 'internal') {
             $aa = "in";
         } else {
             $aa = "ex";
         }
         DB::transaction(function ($aa) use($aa) {
             //asesment promosi
             $jadwal = KandidatPromote::create(['unit_staf_id' => Input::get('unit_id'), 'tgl_awal' => Input::get('tglstart'), 'tgl_asesment' => Input::get('tglases'), 'tgl_selesai' => Input::get('tglfinish'), 'detail' => Input::get('detail')]);
             //rekrutmen rekap header
             $rekap_header = HeaderRekap::create(['id_asesmen' => $jadwal->id, 'kategori' => Input::get('kategori'), 'nama' => Input::get('jabatan'), 'tanggal_awal' => Input::get('tglstart'), 'tanggal_akhir' => Input::get('tglfinish'), 'deksripsi' => Input::get('detail')]);
             //asessment promosi daftar
             $daftar = KandidatPromosiDaftar::create(['asesment_promosi_id' => $jadwal->id, 'nip' => Input::get('nip'), 'detail' => Input::get('detail')]);
             //rekrutment rekap profiling
             $profil = ProfilingRekap::create(['id_rekap' => $rekap_header->id, 'kategori' => $aa, 'nip' => $daftar->nip, 'id_jabatan' => $jadwal->unit_staf_id]);
         });
         Session::flash('message', 'Berhasil Menambahkan Jadwal Asessment');
         return Redirect::to('career/jadwal/lihat/asessment');
     }
 }
开发者ID:hendrilara,项目名称:kemenpan,代码行数:28,代码来源:KandidatPromosiController.php


示例15: permissionsDelete

 public function permissionsDelete($id, $permission)
 {
     $role = $this->model->findOrFail($id);
     $role->perms()->detach($permission);
     flash()->success(trans('LaravelAdmin::laravel-admin.permissionsDetachedSuccess'));
     return Redirect::back();
 }
开发者ID:shinichi81,项目名称:laravel-admin,代码行数:7,代码来源:RolesController.php


示例16: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Requests\CreateCitaRequest $request)
 {
     $datos = HorasAgendadas::create($request->all());
     $message = 'Hora agendada por: ' . $datos->userUsuario->first_name . ' ' . $datos->userUsuario->last_name . ' para el día:' . $datos->fecha . ' y a la hora: ' . date("H:i", $qwerty = strtotime($datos->obtenerHora->hora));
     Session::flash('message', $message);
     return Redirect::route('horas-agendadas');
 }
开发者ID:panxox1323,项目名称:CLINICA,代码行数:13,代码来源:AgendarController.php


示例17: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Requests\CreatePagoRequest $request)
 {
     $pago = Pagos::create($request->all());
     $message = 'Pago efectuado de: ' . $pago->monto . ' al usuario: ' . $pago->user->first_name . ' ' . $pago->user->last_name;
     Session::flash('message', $message);
     return Redirect::route('admin.users.index');
 }
开发者ID:panxox1323,项目名称:Oral_Plus2,代码行数:13,代码来源:PagarController.php


示例18: handle

 /**
  * Handle an incoming request.
  *
  * @param \Illuminate\Http\Request $request
  * @param \Closure                 $next
  *
  * @return mixed
  */
 public function handle(\Illuminate\Http\Request $request, Closure $next)
 {
     if (Auth::user()->cannot('isSuperAdmin', Auth::user())) {
         return Redirect::to('auth/login')->with('danger', "Vous n'etes pas authoriser a acéder à cette partie :(");
     }
     return $next($request);
 }
开发者ID:Symfomany,项目名称:laravelcinema,代码行数:15,代码来源:Authorisation.php


示例19: emptyLogs

 public function emptyLogs()
 {
     ActionLog::truncate();
     $message['result'] = 1;
     $message['content'] = $message['result'] ? '清空日志成功' : '清空日志失败';
     return Redirect::to('admin/actionLogs/')->with('message', $message);
 }
开发者ID:loopeer,项目名称:quickcms,代码行数:7,代码来源:LogController.php


示例20: handle

 /**
  * Handle an incoming request.
  *
  * @param \Illuminate\Http\Request $request
  * @param \Closure                 $next
  *
  * @return mixed
  */
 public function handle($request, \Closure $next)
 {
     if (Setting::get('core::enable-registration')) {
         return $next($request);
     }
     return Redirect::route(config('society.user.config.redirect_route_after_login'));
 }
开发者ID:SocietyCMS,项目名称:User,代码行数:15,代码来源:RegisterMiddleware.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Facades\Request类代码示例发布时间:2022-05-23
下一篇:
PHP Facades\Password类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap