title: Allowed memory size of 134217728 bytes exhausted (tried to allocate 74735240 bytes)
body: <p>i try to create a search form in my laravel project. </p>
  
  <p>So i want to pass all the almost all table columns to the view so i can so i can use them to create dropboxes, checkboxes and etc. </p>
  
  <p>But when i use <code>$var = Model::all();</code> it return this error:</p>
  
  <blockquote>
    <p>Allowed memory size of 134217728 bytes exhausted (tried to allocate
    74735240 bytes)</p>
  </blockquote>
  
  <p>Can you advise me another solution?</p>
  
  <p>This is my controller:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use App\Http\Requests;
  use Illuminate\Http\Request;
  use App\Lot;
  
  class SearchController extends Controller
  {
      /**
       * Create a new controller instance.
       *
       * @return void
       */
      public function __construct()
      {
          $this-&gt;middleware('auth');
      }
  
      /**
       * Show the application dashboard.
       *
       * @return \Illuminate\Http\Response
       */
      public function index()
      {
          $lots = Lot::all();
          return view('lots.search')-&gt;withLot($lots);
      }
  }
  </code></pre>
  
  <p>Thank you!</p>