Wherever you can, try to reduce the number of operators if. For example, I would do the following:
public function photo()
{
if (file_exists( public_path() . '/images/photos/account/' . $this->account_id . '.png')) {
return '/images/photos/account/' . $this->account_id .'.png';
} else {
return '/images/photos/account/default.png';
}
}
<img src="{!! Auth::user()->photo() !!}" alt="">
Makes your template cleaner and uses less code. You can also write a unit test for this method to verify your statement :-)