title: Get image url through User Model in laravel
body: <p>I am trying to create a rule inside the user model, to check the user image is exist, and if it is exist return back the complete image url, I am doing this way but not working in foreach($users as $user) loop.</p>
  
  <pre><code>    public function Image(){
      $image = $this-&gt;user-&gt;image;
      if(empty($image)){
      $image = asset('images/profile/no-image.png');
      }else{
      $image = asset('images/profile/no-image.png');
      }
      return $image;
      }
  </code></pre>