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


PHP Auth::guest方法代码示例

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


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

示例1: getMultiple

 public function getMultiple()
 {
     if (\Auth::guest()) {
         return redirect('auth/login');
     }
     return view('send/multiple');
 }
开发者ID:viliguravlad,项目名称:tokarevsg,代码行数:7,代码来源:SendController.php

示例2: getRegister

 public function getRegister()
 {
     if (\Auth::guest()) {
         return redirect('auth/login');
     }
     return view('admin/register');
 }
开发者ID:viliguravlad,项目名称:tokarevsg,代码行数:7,代码来源:AdminController.php

示例3: view_product

 public function view_product()
 {
     if (\Auth::guest()) {
         return redirect('auth/login');
     }
     return view('backoffice.cart_view_products');
 }
开发者ID:AsyncIT,项目名称:iCart,代码行数:7,代码来源:adminController.php

示例4: index

 /**
  * Show the application welcome screen to the user.
  *
  * @return Response
  */
 public function index()
 {
     if (\Auth::guest()) {
         return redirect()->action('HomeController@index');
     }
     return redirect('auth/login');
 }
开发者ID:clubttt,项目名称:ProjectHealth,代码行数:12,代码来源:WelcomeController.php

示例5: registerForm

 public function registerForm()
 {
     if (!\Auth::guest()) {
         return redirect('/');
     }
     return view('auth.register');
 }
开发者ID:ndrx-io,项目名称:elude,代码行数:7,代码来源:Register.php

示例6: loginForm

 /**
  * @author LAHAXE Arnaud
  *
  *
  * @return $this|\Illuminate\Http\RedirectResponse|\Laravel\Lumen\Http\Redirector
  */
 public function loginForm()
 {
     if (!\Auth::guest()) {
         return redirect('/');
     }
     return view('auth.login', ['googleOauth' => env('GOOGLE_OAUTH_ENABLED')]);
 }
开发者ID:ndrx-io,项目名称:elude,代码行数:13,代码来源:Auth.php

示例7: register

 public function register()
 {
     if (\Auth::guest()) {
         return redirect('auth/login');
     }
     return \Auth::user()->name;
     return view('Pages.register');
 }
开发者ID:AsyncIT,项目名称:iCart,代码行数:8,代码来源:UserController.php

示例8: header

 public static function header()
 {
     if (\Auth::guest()) {
         $count = null;
     } else {
         $count = FollowController::getCounter(\Auth::user()->name);
     }
     return $count;
 }
开发者ID:GoobyeEarth,项目名称:abetter,代码行数:9,代码来源:CommentsController.php

示例9: __construct

 public function __construct()
 {
     dd('sss');
     if (\Auth::guest()) {
         Session::flash('flash_message', 'You need to log in');
         // dd(\Session::all());
         return \Redirect::to('index');
     }
 }
开发者ID:aleximillers,项目名称:estore-laravel-angular,代码行数:9,代码来源:OrderController.php

示例10: info

 public function info()
 {
     if (\Auth::guest()) {
         return view('/');
     }
     $id = \Auth::user()->id;
     $languages = \App\languages::all();
     $courses = \App\courses::all();
     return view('info')->with(compact('languages'))->with(compact('courses'));
 }
开发者ID:kdymowski,项目名称:finalProject,代码行数:10,代码来源:PagesController.php

示例11: getIndex

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function getIndex()
 {
     if (\Auth::check() && \Auth::user()->name === 'admin') {
         return view('admin/main');
     }
     if (\Auth::guest()) {
         return redirect('auth/login');
     }
     return view('home');
 }
开发者ID:viliguravlad,项目名称:tokarevsg,代码行数:15,代码来源:HomeController.php

示例12: update

 /**
  * Update the post in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update($id, Requests\PhotosRequest $request)
 {
     if (\Auth::guest()) {
         return redirect('/');
     }
     $photo = \App\Photo::findorFail($id);
     $photo->update($request->all());
     session()->flash('flash_message', 'Photo Successfully Saved!');
     return redirect('photos/' . $photo->blog_id . '');
 }
开发者ID:Gadurp1,项目名称:GetRealClothing,代码行数:17,代码来源:PhotosController.php

示例13: update

 public function update($id, ArticleRequest $request)
 {
     if (\Auth::guest()) {
         return redirect('article');
     }
     $article = Article::findOrFail($id);
     $article['updated_at'] = Carbon::now('Asia/Shanghai');
     $article->update($request->all());
     return redirect('article');
 }
开发者ID:2zH,项目名称:wind.moe,代码行数:10,代码来源:WindController.php

示例14: show

 public function show(Article $article)
 {
     if (!$article->is_visible and \Auth::guest()) {
         return abort(403);
     }
     if (\Auth::check() and !is_admin_role(\Auth::user())) {
         if (!$article->is_visible and !\Auth::user()->owns($article)) {
             return abort(403);
         }
     }
     return view('article.show', compact('article'));
 }
开发者ID:Ravend6,项目名称:laravel_base_v5.2,代码行数:12,代码来源:ArticleController.php

示例15: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $greet = '';
     $submission = null;
     if (\Auth::check()) {
         $user = \Auth::user();
         $greet = $this->setGreeting($user);
         $submission = Submission::where('facebook_id', $user->facebook_id)->first();
     } else {
         $user = \Auth::guest();
     }
     return view('index')->with('user', $user)->with('greeting', $greet)->with('submission', $submission);
 }
开发者ID:Shahar-Galukman,项目名称:listen,代码行数:18,代码来源:SongsController.php


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