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


PHP Redirector::route方法代码示例

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


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

示例1: requestUpdate

 /**
  * Update a Menu
  *
  * @param  integer $id
  * @param  array   $input
  * @return Redirect
  */
 public function requestUpdate($id, $input)
 {
     if ($this->Manager->updateMenu($id, $input)) {
         return $this->Redirect->route('dvs-menus');
     }
     return $this->Redirect->route('dvs-menus-edit', $id)->withInput()->withErrors($this->Manager->errors)->with('message', $this->Manager->message);
 }
开发者ID:devisephp,项目名称:cms,代码行数:14,代码来源:MenusResponseHandler.php

示例2: getDelete

 public function getDelete(Post $ad)
 {
     if ($ad) {
         $ad->delete();
     }
     return $this->redirector->route('ad.list');
 }
开发者ID:PhonemeCms,项目名称:cms,代码行数:7,代码来源:AdController.php

示例3: requestDestroyPage

 /**
  * Request the page be deleted from database
  *
  * @param  integer $id
  * @return Redirector
  */
 public function requestDestroyPage($id)
 {
     $page = $this->ApiPagesManager->destroyPage($id);
     if ($page) {
         return $this->Redirect->route('dvs-api')->with('message', 'Request successfully removed');
     }
     return $this->Redirect->route('dvs-api')->withInput()->withErrors($this->ApiPagesManager->errors)->with('message', $this->ApiPagesManager->message);
 }
开发者ID:devisephp,项目名称:cms,代码行数:14,代码来源:ApiPagesResponseHandler.php

示例4: filter

 /**
  * Execute the route filter.
  *
  * @param \Illuminate\Routing\Route $route
  *
  * @return void|\Illuminate\Http\RedirectResponse
  */
 public function filter($route)
 {
     $slug = $this->getSlug($route);
     $userId = $this->getUserId();
     if (!$this->isTrickOwnedByUser($slug, $userId)) {
         return $this->redirect->route('browse.recent');
     }
 }
开发者ID:phpspider,项目名称:laravel-tricks,代码行数:15,代码来源:TrickOwnerFilter.php

示例5: postEdit

 public function postEdit(Slider $slider)
 {
     $slider->title = $this->request->get('title');
     $slider->description = $this->request->get('description');
     $slider->featured_image = $this->request->get('featured_image');
     $slider->save();
     return $this->redirector->route('slider.edit', ['id' => $slider->id]);
 }
开发者ID:PhonemeCms,项目名称:cms,代码行数:8,代码来源:SliderController.php

示例6: postEdit

 public function postEdit(Category $cat)
 {
     $cat->title = $this->request->get('title');
     $cat->parent_id = $this->request->get('parent_id');
     $cat->language = $this->request->get('language');
     $cat->save();
     return $this->redirector->route('cat.getEdit', ['id' => $cat->id]);
 }
开发者ID:PhonemeCms,项目名称:cms,代码行数:8,代码来源:CatController.php

示例7: postEdit

 public function postEdit(Post $Page)
 {
     $Page->subject = $this->request->get('subject');
     $Page->permalink = $this->request->get('permalink');
     $Page->content = $this->request->get('content');
     $Page->save();
     return $this->redirector->route('page.list', ['id' => $Page->id]);
 }
开发者ID:PhonemeCms,项目名称:cms,代码行数:8,代码来源:PageController.php

示例8: requestCreateNewModel

 /**
  * Request a new page be created
  *
  * @param  array $input
  * @return Redirector
  */
 public function requestCreateNewModel($input)
 {
     $scaffolding = $this->ScaffoldingManager->makeScaffolding($input, $this->CrudScaffolding);
     if ($scaffolding) {
         return $this->Redirect->route('dvs-dashboard');
     }
     return $this->Redirect->route('dvs-models-create')->withInput()->withErrors($this->ScaffoldingManager->errors)->with('message', $this->ScaffoldingManager->message);
 }
开发者ID:devisephp,项目名称:cms,代码行数:14,代码来源:ScaffoldingResponseHandler.php

示例9: store

 public function store()
 {
     $validator = $this->validationFactory->make($this->request->except('_token', 'submit'), $this->rules['create']);
     if ($validator->fails()) {
         return $this->redirector->back()->withInput()->withErrors($validator);
     }
     $this->clients->create($this->request->get('name'), $this->request->get('redirect_uri'), (array) $this->request->get('grants'), (array) $this->request->get('scopes'));
     return $this->redirector->route('oauth.clients.index')->with('success', "Client added successfully.");
 }
开发者ID:jorycn,项目名称:oauth2-server-manager,代码行数:9,代码来源:ClientController.php

示例10: handle

 /**
  * Execute the route filter.
  *
  * @param \Illuminate\Routing\Route $route
  *
  * @return void|\Illuminate\Http\RedirectResponse
  */
 public function handle($request, Closure $next)
 {
     $slug = $this->getSlug($request->route());
     $userId = $this->getUserId();
     if (!$this->isTrickOwnedByUser($slug, $userId)) {
         return $this->redirect->route('browse.recent');
     }
     return $next($request);
 }
开发者ID:qloog,项目名称:site,代码行数:16,代码来源:TrickOwner.php

示例11: store

 /**
  * Store the scope
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function store()
 {
     $validator = $this->validationFactory->make($this->request->except('_token', 'submit'), $this->rules['create']);
     if ($validator->fails()) {
         return $this->redirector->back()->withInput()->withErrors($validator);
     }
     $this->scopes->create($this->request->get('id'), $this->request->get('description'));
     return $this->redirector->route('oauth.scopes.index')->with('success', "Scope added successfully.");
 }
开发者ID:jorycn,项目名称:oauth2-server-manager,代码行数:14,代码来源:ScopeController.php

示例12: index

 /**
  * @return \Illuminate\Contracts\View\View|\Illuminate\Http\RedirectResponse
  */
 public function index()
 {
     $gamertag = $this->request->get('gamertag');
     if ($gamertag) {
         $result = destiny()->player($gamertag);
         if ($result->count() == 1) {
             return $this->redirect->to($result->first()->url);
         } elseif ($result->count() > 1) {
             return $this->redirect->route('select', ['gamertag' => $gamertag]);
         }
         return $this->view->make('search', ['gamertag' => $gamertag, 'result' => $result]);
     }
     return $this->view->make('index', ['advisors' => destiny()->advisors()]);
 }
开发者ID:TrackerNetwork,项目名称:DestinyStatus,代码行数:17,代码来源:HomeController.php

示例13: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(Request $request, Redirector $redirect)
 {
     //
     $this->guardarDatos($request, null);
     Session::flash('message', 'El idioma se ha creado correctamente');
     return $redirect->route("languages.index");
 }
开发者ID:serranozafra,项目名称:pruebaHectorSerrano,代码行数:13,代码来源:LanguageController.php

示例14: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Closure                 $next
  * @return mixed
  */
 public function handle($request, \Closure $next)
 {
     // Check if the user is logged in
     if (!$this->auth->check()) {
         // Store the current uri in the session
         $this->session->put('url.intended', $this->request->url());
         // Redirect to the login page
         return $this->redirect->route('login');
     }
     // Check if the user has access to the dashboard page
     if (!$this->auth->hasAccess('dashboard.index')) {
         // Show the insufficient permissions page
         return $this->application->abort(403);
     }
     return $next($request);
 }
开发者ID:Houbsi,项目名称:Core,代码行数:23,代码来源:AdminMiddleware.php

示例15: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request, Redirector $redirect)
 {
     $rules = array('first_name' => 'required', 'last_name' => 'required', 'email' => 'required|email|unique:users,email', 'password' => 'required|size:6', 'type' => 'required|in:user,admin');
     $this->validate($request, $rules);
     $user = User::create($request->all());
     return $redirect->route('admin.users.index');
 }
开发者ID:robertobustamante,项目名称:laravel,代码行数:13,代码来源:UsersController.php


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