Hello.
I extended myth auth to have user picture, so I can acces that property like this:
PHP Code:
<?= user()->profile_pic ?>
What would the best approach display a stock image if picture is not set? Should i validate right in the view like this?
PHP Code:
<?php
$userpic = !(user()->profile_pic ? 'custom_pic.jpg : user()->profile_pic;
?>
Or it would be a better practice to do this in the controller and just recieve in the view the pic like a variable already validated?