Laravel same route, different controller

后端 未结 4 1278
执念已碎
执念已碎 2020-12-19 12:16

I would like to have general home page and a different homepage for logged-in users
I search a lot on google but I can\'t find what to put in my if statement

I t

4条回答
  •  情书的邮戳
    2020-12-19 12:52

    The most simple solution I can think of is:

    'home'
        ,'uses'=> $uses
    ));
    

    Or you can just route the url / to method index() and do the Auth::check() in there.

提交回复
热议问题