0

Is there a way to check if user is logged in using sentinel::check() in vue file. I tried using the blade syntax but it doesn't work (see below).

 @if(Sentinel::check())
 @endif

Maybe anyone knows how? Thank you in advance.

shifu
  • 672
  • 8
  • 37
ampedo
  • 257
  • 2
  • 17
  • 4
    That's blade syntax and you said you're using a .vue file which this will not work. Try posting your Laravel view code and your vue file you want to show if the user is logged in. –  Jan 30 '19 at 10:57
  • yes that is blade syntax. I wonder if vue has something for checking user if logged in for sentinel. or should i use other way of logging in of user instead of sentinel? – ampedo Jan 30 '19 at 15:05
  • 1
    You can pass it to your vue component as a prop, you could put your component inside the if statement. Without more code, I can't give you a definitive answer to achieve your outcome. –  Jan 30 '19 at 15:07

0 Answers0