title: Laravel 5 Eloquent model error
body: <p>im having this error with Eloquent models while trying to make multiple model joins:</p>
  
  <p>BadMethodCallException in Builder.php line 2450: Call to undefined method Illuminate\Database\Query\Builder::adminis()</p>
  
  <p>These are my models:</p>
  
  <pre><code> &lt;?php
  
      namespace App\Modelos;
  
      use Illuminate\Database\Eloquent\Model;
  
      class srh_inf_persona extends Model
      {
          protected $table = 'srh_inf_personas';
  
          protected $primaryKey = ['infp_cedula'];
  
          public function adminis()
          {
              return $this-&gt;hasMany('App\Modelos\srh_infa_admini');
          }
      }
  </code></pre>
  
  <p>
  
  <pre><code>use Illuminate\Database\Eloquent\Model;
  
  class srh_inf_admini extends Model
  {
      protected $table = 'srh_inf_adminis';
      public $timestamps = 'false';
  
      protected $primaryKey = ['infa_cedula'];
  
      public function persona()
      {
          return $this-&gt;belongsTo('App\Modelos\srh_inf_persona');
      }
  }
  </code></pre>
  
  <p>and this is my controller query:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers\Controladores;
  
  use Illuminate\Http\Request;
  use App\Http\Controllers\Controller;
  use App\Modelos\srh_inf_persona; // Llamado del modelo SRH_INF_PERSONA
  use App\Modelos\srh_inf_admini; // Llamado del modelo SRH_INF_PERSONA
  
  class SolicitudController extends Controller
  {
      // Consulta para generar la solicitud de permisos
      public function nuevasolicitud($ced)
      {       
          $consulta = srh_inf_persona::select('infp_cedula')-&gt;adminis()
          -&gt;where('infp_cedula',$ced)
          -&gt;first();
  
          return view('permisos.solicitud',[ 'personas' =&gt; $consulta ]);
      }
  
  }
  </code></pre>
  
  <p>Any idea what the problem is?
  Thanks alot.</p>