title: ErrorException in 2b026073a4c3afa6c3599efffe5361a356c89d88.php line 63: Trying to get property of non-object (View: \index.blade.php)
body: <p>model user</p>
  
  <pre><code>protected $table = "users";
  protected $fillable = ['name', 'email', 'password' ];
  
  
  protected $hidden = [
      'password', 'remember_token',
  ];
  
  public function solicitud(){
      return $this-&gt;hasMany('App\solicitud');        
  } 
  </code></pre>
  
  <p>Model tiposolicitud</p>
  
  <pre><code>      protected $table = "tiposolicitud";
  protected $fillable = ['nombre'];
  
  
  public function solicitud(){
      return $this-&gt;hasMany('App\solicitud');        
  }
  </code></pre>
  
  <p>Model solicitud ( principal )</p>
  
  <pre><code>  protected $table = "solicitud";
    protected $fillable = [..extract...   'tiposolicitud_id','users_id'....];
  
  
    public function tiposolicitud(){
      return $this-&gt;belongsTo('App\tiposolicitud');
  }
  
        public function User(){
      return $this-&gt;belongsTo('App\User');
  }
  </code></pre>
  
  <p>Controller ( extract)</p>
  
  <pre><code> use App\solicitud as VarModel;
   use App\User;
   use App\tiposolicitud ;
   ...
   public function index()
  {
  
      $var1 = VarModel::all();
      return view('private.solicitud.index',compact('var1'));
  }
  </code></pre>
  
  <p>index.php</p>
  
  <pre><code>  @foreach ($var1 as $var)
     &lt;tr&gt;
         &lt;td&gt;{{$var-&gt;id}}&lt;/td&gt;               // OK
         &lt;td&gt;{{$var-&gt;user-&gt;name}}&lt;/td&gt;       //NOT OK
         &lt;td&gt;{{$var-&gt;tiposolicitud}}&lt;/td&gt;    // OK
  </code></pre>
  
  <blockquote>
    <p>Trying to get property of non-object (View: C:\wamp64\www\issdgr\resources\views\private\solicitud\index.blade.php)</p>
  </blockquote>
  
  <p>I have problem with app / user</p>
  
  <p>I have persisted the id of the user but I can not find the name ..</p>
  
  <p>HELP!!!!! </p>