in2tech Posted October 21, 2018 Report Share Posted October 21, 2018 (edited) Nabeel provided the code for the authorization Logged In user and I asked on a Laravel forum about adding Guest because I am new to Laravel and basic PHP coding. So if you want to display the Logged In user or show Guest use this code in your phpVMS v7 theme: [code} @if(Auth::check()) Welcome: <font color="#6D0C1F"> {{ Auth::user()->name }} @else Welcome: <font color="#6D0C1F"> Guest @endif</font> [/code] I'll fix the colors with CSS down the road for now I just cheated to make it quick. Hope this is helpful to someone. And it looks like this: I like seeing my name when logged in! Let's me know at a glance that I am logged in! And if you are an admin and testing stuff what user you are logged in as. Been doing that a lot lately as I learn Laravel basics and phpVMS 7! Edited October 21, 2018 by in2tech Quote Link to comment Share on other sites More sharing options...
Heritage1 Posted October 21, 2018 Report Share Posted October 21, 2018 Thanks for sharing that, for those who are using PHPVMS 5.x.xx, here is a simple code to view your members online; <?php $usersonline = StatsData::UsersOnline(); foreach($usersonline as $pilot) { echo "{$pilot->firstname} {$pilot->lastname}-{$pilot->rank}-{$pilot->location}<br />"; } ?> This gives, 3 total viewing options, you may of course weed it down to your choices. 1 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 25, 2018 Administrators Report Share Posted October 25, 2018 On 10/21/2018 at 5:02 PM, Heritage1 said: Thanks for sharing that, for those who are using PHPVMS 5.x.xx, here is a simple code to view your members online; <?php $usersonline = StatsData::UsersOnline(); foreach($usersonline as $pilot) { echo "{$pilot->firstname} {$pilot->lastname}-{$pilot->rank}-{$pilot->location}<br />"; } ?> This gives, 3 total viewing options, you may of course weed it down to your choices. Let's not put the older phpVMS stuff in here, I don't want to confuse people. Quote Link to comment Share on other sites More sharing options...
Heritage1 Posted October 26, 2018 Report Share Posted October 26, 2018 Sorry about that, wasn't thinking, I'm bad, won't happen again 😁 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.