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


PHP Redirect::Action方法代码示例

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


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

示例1: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     if (ACL::checkUserPermission('permission.show') == false) {
         return Redirect::action('dashboard');
     }
     $title = Lang::get('Permission Info');
     $permissionInfo = Permission::find($id);
     if (!empty($permissionInfo)) {
         return View::make('permission/show', array('permissionInfo' => $permissionInfo, 'title' => $title));
     } else {
         $message = 'Cannot find Permission Info';
         return Redirect::Action('settings.permission')->with('error', $message);
     }
 }
开发者ID:pacificcasinohotel,项目名称:pointsystem,代码行数:20,代码来源:PermissionController.php

示例2: process

 /**
  * Process the contact us form data
  *
  * @return \Illuminate\Support\Facades\Redirect
  */
 public function process()
 {
     $rules = ['first_name' => 'required', 'last_name' => 'required', 'company' => '', 'email' => 'required|email', 'phone' => '', 'message_body' => 'required'];
     $data = \Input::only('first_name', 'last_name', 'email', 'company', 'phone', 'message_body');
     $validator = \Validator::make($data, $rules);
     if ($validator->fails()) {
         return \Redirect::Action('ContactController@index')->withErrors($validator)->withInput();
     }
     //-- Save to database incase email is lost, or fails
     $contact = \Contact::create($data);
     \Mail::send('emails.contact', $data, function ($message) {
         $message->to('john.doe@email.com', 'John Doe')->subject('Welcome!');
     });
     return \Redirect::Action('ContactController@thankYou');
 }
开发者ID:jm-comentum,项目名称:kendo-laravel-hybrid-app-starter-kit,代码行数:20,代码来源:ContactController.php

示例3: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     if (ACL::checkUserPermission('player.edit') == false) {
         return Redirect::action('dashboard');
     }
     $player_info = User::find($id);
     if (!empty($player_info)) {
         $title = Lang::get('Edit Player Details');
         $form_open = Form::open(array('method' => 'put', 'id' => 'form-player', 'class' => 'smart-form', 'route' => array('player.update', $id)));
         $form_close = Form::close();
         $data = array('form_open' => $form_open, 'form_close' => $form_close, 'title' => $title, 'url_rfid' => URL::route('player.rfid'), 'player_info' => $player_info);
         return View::make('player/edit', $data);
     } else {
         $message = 'Cannot get player info. Please try again.';
         return Redirect::Action('player.index')->with('error', $message);
     }
 }
开发者ID:pacificcasinohotel,项目名称:pointsystem,代码行数:23,代码来源:PlayerController.php

示例4: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     if (ACL::checkUserPermission('user.show') == false) {
         return Redirect::action('dashboard');
     }
     $title = Lang::get('User Info');
     $userInfo = User::find($id);
     $userMember = UserMember::with('group')->where('user_id', $id)->get();
     $userAccess = ACL::checkPermission($id);
     if (!empty($userInfo)) {
         return View::make('user/show', array('userInfo' => $userInfo, 'userMember' => $userMember, 'userAccess' => $userAccess['access'], 'title' => $title));
     } else {
         $message = 'Cannot find User Info';
         return Redirect::Action('settings.user')->with('error', $message);
     }
 }
开发者ID:pacificcasinohotel,项目名称:pointsystem,代码行数:22,代码来源:UsersController.php


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