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


PHP Redirect::route方法代码示例

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


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

示例1: delete

 /**
  * @return mixed
  */
 public function delete()
 {
     $bookId = Input::get('book_id');
     $book = Book::find($bookId);
     $book->delete();
     return Redirect::route('books')->with('message', sprintf('Book "%s" deleted', $book->title));
 }
开发者ID:VasylKozyrenko,项目名称:library,代码行数:10,代码来源:BookController.php

示例2: 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

示例3: search

 /**
  * search in Flickr API for a specific set of keywords
  *
  * @param SearchRequest $request
  * @param int $id
  * @return mixed
  */
 public function search(SearchRequest $request, $id = 1)
 {
     $photoSearch = $request->all();
     $query = $photoSearch['photoSearch'];
     $data = $this->flickrRepository->search($query, $id);
     return Redirect::route('search.page', [$query, $id])->with($data);
 }
开发者ID:alexisribault,项目名称:flickrapi,代码行数:14,代码来源:GalleryController.php

示例4: 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

示例5: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Closure                 $next
  * @return mixed
  */
 public function handle($request, \Closure $next)
 {
     if ($this->auth->check()) {
         return Redirect::route(config('asgard.user.users.redirect_route_after_login'));
     }
     return $next($request);
 }
开发者ID:Houbsi,项目名称:User,代码行数:14,代码来源:GuestMiddleware.php

示例6: handle

 /**
  * Handle an incoming request.
  *
  * @param \Illuminate\Http\Request $request
  * @param \Closure                 $next
  *
  * @return mixed
  */
 public function handle(Request $request, Closure $next)
 {
     if (!subscribers_enabled()) {
         return Redirect::route('status-page');
     }
     return $next($request);
 }
开发者ID:mohitsethi,项目名称:Cachet,代码行数:15,代码来源:SubscribersConfigured.php

示例7: remove

 /**
  * Remove post with given id
  *
  * @param $id
  * @return mixed
  */
 public function remove($id)
 {
     $post = $this->getRepository()->find($id);
     EntityManager::remove($post);
     EntityManager::flush();
     return Redirect::route('post.list');
 }
开发者ID:hoangnd25,项目名称:laravel-boilerplate,代码行数:13,代码来源:PostController.php

示例8: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     //define rules
     //$rules = array(
     //        'name' => array('required', 'unique:todo_lists')
     //    );
     // pass input to validator
     //$validator = Validator::make(Input::all(), $rules);
     // test if input fails
     // if ($validator->fails()) {
     //     return Redirect::route('todos.create')->withErrors($validator)->withInput();
     //}
     $this->validate($request, ['name' => 'required|unique:posts|max:255']);
     // pass input to validator
     $validator = Validator::make(Input::all(), $this);
     // test if input fails
     if ($validator->fails()) {
         $message = $validator->messages();
         return $messages;
         //return Redirect::route('todos.create')->withErrors($validator)->withInput();
     }
     $name = Input::get('name');
     $list = new TodoList();
     $list->name = $name;
     $list->save();
     return Redirect::route('todos.index')->withMessage('List Was Created!');
 }
开发者ID:MikeAguilera,项目名称:laravel-basics,代码行数:33,代码来源:TodoListController.php

示例9: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function update($id = null)
 {
     $user = Auth::user();
     $input = Input::only('location', 'website', 'bio', 'twitter', 'facebook', 'github', 'cover', 'image', 'notify_articles');
     $user->profile()->update($input);
     return Redirect::route('user-package::profile.show');
 }
开发者ID:raymondidema,项目名称:user-package,代码行数:14,代码来源:ProfilesController.php

示例10: handle

 /**
  * We're verifying that subscribers is both enabled and configured.
  *
  * @param \Illuminate\Http\Request $request
  * @param \Closure                 $next
  *
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (!subscribers_enabled()) {
         return Redirect::route('explore');
     }
     return $next($request);
 }
开发者ID:xiuchanghu,项目名称:Gitamin,代码行数:15,代码来源:SubscribersConfigured.php

示例11: delete

 /**
  * @return mixed
  */
 public function delete()
 {
     $userId = Input::get('user_id');
     $user = User::find($userId);
     $user->delete();
     return Redirect::route('users')->with('message', sprintf('User "%s" deleted', $user->first_name));
 }
开发者ID:VasylKozyrenko,项目名称:library,代码行数:10,代码来源:UserController.php

示例12: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Requests\CreatePagos2Request $request)
 {
     $pago = new Pagos($request->all());
     $usuario = User::findOrFail($pago->user_id);
     if ($usuario->saldo > 0 && $pago->monto <= $usuario->saldo) {
         $saldo = $usuario->saldo;
         $saldo2 = $usuario->saldo = $saldo - $pago->monto;
         DB::table('users')->where('id', $usuario->id)->update(['saldo' => $saldo2]);
         $pago = Pagos::create($request->all());
         $message = 'El Paciente ' . $usuario->first_name . ' ' . $usuario->last_name . ' pagó un total de: ' . '$' . number_format($pago->monto);
         Session::flash('message', $message);
         if (Auth::user()->type == 'admin') {
             return Redirect::route('admin.pagar.index');
         }
         if (Auth::user()->type == 'secretaria') {
             return Redirect::route('secretaria.pagar.index');
         }
     } else {
         $message = $usuario->first_name . ' ' . $usuario->last_name . ' no registra deuda en el sistema o el monto de ' . '$' . number_format($pago->monto) . ' que se quiere pagar es superior al saldo: ' . '$' . number_format($usuario->saldo);
         Session::flash('message', $message);
         if (Auth::user()->type == 'admin') {
             return Redirect::route('admin.pagar.index');
         }
         if (Auth::user()->type == 'secretaria') {
             return Redirect::route('secretaria.pagar.index');
         }
     }
 }
开发者ID:panxox1323,项目名称:CLINICA,代码行数:34,代码来源:PagarController.php

示例13: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  */
 public function show($id)
 {
     // if exist external content then send it to browser, increment views
     $external_content = $this->showPage->checkAndGetContentFromHtmlFile(app('veer')->siteId, $id);
     if (!empty($external_content)) {
         \Veer\Models\Page::where('id', '=', $id)->increment('views');
         return \Response::make($external_content, 200)->header('Content-type', 'text/html');
     }
     $page = $this->showPage->getPage($id, app('veer')->siteId);
     if (!is_object($page)) {
         return Redirect::route('page.index');
     }
     $page->increment('views');
     $page->load(array('images' => function ($q) {
         return $q->orderBy('pivot_id', 'asc');
     }, 'tags', 'attributes', 'downloads', 'userlists', 'user'));
     $page->imagesIds = collect($page->images->getDictionary());
     if ($page->show_comments == 1) {
         $this->showPage->loadComments($page, 'page');
     }
     $paginator_and_sorting = get_paginator_and_sorting();
     $data = array("page" => $page, "subpages" => $this->showPage->withChildPages(app('veer')->siteId, $page->id, $paginator_and_sorting), "parentpages" => $this->showPage->withParentPages(app('veer')->siteId, $page->id, $paginator_and_sorting), "products" => $this->showPage->withProducts(app('veer')->siteId, $page->id, $paginator_and_sorting), "categories" => $this->showPage->withCategories(app('veer')->siteId, $page->id), "template" => $this->template);
     $blade_path = $this->template . '.pages.' . $id;
     $viewLink = $this->template . '.page';
     // page with special design
     if ($page->original == 1 && \View::exists($blade_path)) {
         $viewLink = $blade_path;
     }
     $view = viewx($viewLink, $data);
     $this->view = $view;
     return $view;
 }
开发者ID:artemsk,项目名称:veer-core,代码行数:37,代码来源:PageController.php

示例14: store

 public function store(ActorsRequest $request)
 {
     $actors = new Actors();
     $actors->firstname = $request->nom;
     $actors->lastname = $request->prenom;
     $actors->dob = $request->dob;
     $actors->nationality = $request->nationalite;
     $actors->image = $request->image;
     $filename = "";
     if ($request->hasFile('image')) {
         //je recupere mon fichier :
         $file = $request->file('image');
         //je recupere le nom du fichier :
         $filename = $file->getClientOriginalName();
         //je stock le chemin veers lequel mon image va etre envoyé
         $destinationPath = public_path() . '/uploads/actors';
         //je deplace mon fichier uploader :
         $file->move($destinationPath, $filename);
     }
     $actors->image = asset("uploads/movies/" . $filename);
     $actors->save();
     Session::flash('success', "L\\'acteur {$actors->nom} a été ajouté");
     return Redirect::route('actors_index');
     //recupere le film de mon film ac la methode POST
     //input (name de mon champ) permet de recuperer la donéne titre de maniere safely
 }
开发者ID:haldaaa,项目名称:Laracinema,代码行数:26,代码来源:ActorsController.php

示例15: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $property = Property::findOrFail($request->all()['property_id']);
     $rental = ['id' => $request->all()['rental_id'], 'dailyAmount' => $request->all()['rental_dailyAmount'], 'from' => $request->all()['rental_from'], 'to' => $request->all()['rental_to'], 'media' => self::stripMedia($request)];
     Rental::store($rental['dailyAmount'], $rental['from'], $rental['to'], $property, $rental['media'], $rental['id']);
     return Redirect::route('rental.index');
 }
开发者ID:larryu,项目名称:properta,代码行数:13,代码来源:RentalController.php


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