title: Laravel throwing: method paginate does not exist error
body: <p>I am trying to use pagination in laravel. so i try to retrieve all the transactions and paginate it. my flow goes like this for your reference view->controller->repository->model .</p>
  
  <p>myrepository:</p>
  
  <pre><code>public function getall(){
  
      $this-&gt;transaction = Transaction::all();
  
  
      return $this-&gt;transaction;
  
  }
  </code></pre>
  
  <p>mycontroller:</p>
  
  <pre><code> public function getall(){   
    $transactions = $this-&gt;transaction-&gt;getall()-&gt;paginate(10);
  
      //dd($this-&gt;transaction);
  
  
  
      return view('transactions', ['transactions' =&gt; $transactions]);
  
  }
  </code></pre>
  
  <p>in my app.php under service providers i made sure i have pagination: Illuminate\Pagination\PaginationServiceProvider::class,</p>
  
  <p>but there is no aliases though.
  so in my controller i did : use Illuminate\Pagination;</p>