title: laravel undefined property (repository)
body: <p>I don't know why I'm getting this error: </p>
  
  <blockquote>
    <p>Undefined property:
    App\Repositories\Admin\MedicineRepository::$getMedicineInformation</p>
  </blockquote>
  
  <p>when I'm just dd-ing the result value</p>
  
  <p>MedicineCOntroller.php</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\Repositories\Admin\MedicineRepository;
  use App\Http\Requests;
  use App\Dosage;
  
  class MedicineController extends Controller
  {
      public function __construct(MedicineRepository $MedicineRepository)
      {
          $this-&gt;MedicineRepository = $MedicineRepository;
      }
  
      public function getMedicine()
      {
          $medicine = $this-&gt;MedicineRepository-&gt;getMedicineInformation;
          dd($medicine);
          //return view('admin.show-medicines',compact('dosage'));
      }
  }
  </code></pre>
  
  <p>MedicineRepository.php</p>
  
  <pre><code>&lt;?php
  namespace App\Repositories\Admin;
  use App\Medicine,
  App\Dosage;
  
  class MedicineRepository 
  {
  
      public function __construct(Medicine $medicine, Dosage $dosage){
          $this-&gt;medicine = $medicine;
          $this-&gt;dosage = $dosage;
      }
  
      public function getMedicineInformation()
      {
          return $medicine
          -&gt;join($this-&gt;dosage,'medicines.id' ,'=', 'dosages.medicine_id')
          -&gt;select('generic_name','dosages.dosage_name');
      }
  
  
  
  
  
  
  }
  </code></pre>