當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。