title: Error Class Does Not Exist
body: <p>Error I am getting is</p>
  
  <pre><code>ReflectionException in compiled.php line 1082:
  Class App\Repositories\Frontend\Lewp does not exist
  </code></pre>
  
  <p>Here is the longer error message</p>
  
  <pre><code>in compiled.php line 1082
  at ReflectionParameter-&gt;getClass() in compiled.php line 1082
  at Container-&gt;getDependencies(array(object(ReflectionParameter)), array()) in compiled.php line 1074
  at Container-&gt;build('App\Http\Controllers\Frontend\FrontendController', array()) in compiled.php line 1012
  at Container-&gt;make('App\Http\Controllers\Frontend\FrontendController', array()) in compiled.php line 1550
  at Application-&gt;make('App\Http\Controllers\Frontend\FrontendController') in compiled.php line 8791
  at ControllerDispatcher-&gt;makeController('App\Http\Controllers\Frontend\FrontendController') in compiled.php line 8780
  at ControllerDispatcher-&gt;dispatch(object(Route), object(Request), 'App\Http\Controllers\Frontend\FrontendController', 'lewp') in compiled.php line 7759
  at Route-&gt;runWithCustomDispatcher(object(Request)) in compiled.php line 7730
  at Route-&gt;run(object(Request)) in compiled.php line 7383
  at Router-&gt;Illuminate\Routing\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in compiled.php line 9455
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in compiled.php line 9437
  at Pipeline-&gt;then(object(Closure)) in compiled.php line 7384
  at Router-&gt;runRouteWithinStack(object(Route), object(Request)) in compiled.php line 7372
  at Router-&gt;dispatchToRoute(object(Request)) in compiled.php line 7357
  at Router-&gt;dispatch(object(Request)) in compiled.php line 2066
  at Kernel-&gt;Illuminate\Foundation\Http\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in compiled.php line 9455
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2637
  at VerifyCsrfToken-&gt;handle(object(Request), object(Closure)) in VerifyCsrfToken.php line 17
  at VerifyCsrfToken-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9447
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12699
  at ShareErrorsFromSession-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9447
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 11348
  at StartSession-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9447
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12437
  at AddQueuedCookiesToResponse-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9447
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12376
  at EncryptCookies-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9447
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2687
  at CheckForMaintenanceMode-&gt;handle(object(Request), object(Closure))
  at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9447
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))
  at call_user_func(object(Closure), object(Request)) in compiled.php line 9437
  at Pipeline-&gt;then(object(Closure)) in compiled.php line 2013
  at Kernel-&gt;sendRequestThroughRouter(object(Request)) in compiled.php line 1999
  at Kernel-&gt;handle(object(Request)) in index.php line 54
  at require_once('C:\projects\lewp\public\index.php') in server.php line 21
  </code></pre>
  
  <p>I am not positive that I have everything setup correctly.  Have been working on trying to get this setup correctly and really struggling with how everything attaches to each other.  </p>
  
  <pre><code>&lt;?php namespace App\Http\Controllers\Frontend;
  
  use App\Http\Controllers\Controller;
  use App\Repositories\Frontend\Lewp as Lewp;
  
  /**
   * Class FrontendController
   * @package App\Http\Controllers
   */
  class FrontendController extends Controller {
      protected $lewp;
  
      function __construct(Lewp $lewp) {
          $this-&gt;lewp = $lewp;
      }
      /**
       * @return \Illuminate\View\View
       */
      public function index()
      {
          return view('frontend.index');
      }
  
      /**
       * @return \Illuminate\View\View
       */
      public function macros()
      {
          return view('frontend.macros');
      }
      public function post()
      {
          return view('frontend.post');
      }
      public function exterior()
      {
          return view('frontend.exterior');
      }
      public function submit()
      {
          return view('frontend.submit');
      }
      public function self()
      {
          return view('frontend.self');
      }
      public function lewp($name)
      {
          if(strlen($name) == 0)
          {
              return view('frontend.index');
          }
          $lewp = $this-&gt;lewp-&gt;getLewpByName($name);
          return view::make('frontend.lewp', array('lewp' =&gt; $lewp));
      }
  }
  </code></pre>
  
  <p>Here is the model</p>
  
  <pre><code>&lt;?php namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Database\Eloquent\SoftDeletes;
  
  class Lewp extends Model
  {
      use SoftDeletes;
      /**
       * The database table used by the model.
       *
       * @var string
       */
      protected $table = 'lewps';
  
      /**
       * The attributes that are not mass assignable.
       *
       * @var array
       */
      protected $guarded = ['id'];
  
      /**
       * The attributes excluded from the model's JSON form.
       *
       * @var array
       */
      protected $hidden = [];
  
      /**
       * For soft deletes
       *
       * @var array
       */
      protected $dates = ['deleted_at'];   
  }
  </code></pre>
  
  <p>Here is the repository</p>
  
  <pre><code>&lt;?php namespace App\Repositories\Frontend;
  
  use App\Lewp;
  use App\Exceptions\GeneralException;
  
  
  /**
   * Class EloquentUserRepository
   * @package App\Repositories\Lewp
   */
  class EloquentLewpRepository implements LewpContract {
  
      public function __construct(Lewp $lewpRepository) 
      { 
          $this-&gt;lewpRepository = $lewpRepository; 
      }
  
      /**
       * @param $id
       * @return \Illuminate\Support\Collection|null|static
       * @throws GeneralException
       */
      public function findOrThrowException($id) {
          $lewp = Lewp::find($id);
          if (! is_null($lewp)) return $lewp;
          throw new GeneralException('That lewp does not exist.');
      }
  
      /**
       * @param $data
       * @param bool $provider
       * @return static
       */
  
      public function create($data) {
          $lewp = Lewp::create([
              'name' =&gt; $data['name'],
              'title' =&gt; $data['title'],
              'text' =&gt; $data['text'],
              'sidebar' =&gt; $data['sidebar'],
              'submission_text' =&gt; $data['submission_text'],
              'type' =&gt; $data['type'],
              'content_options' =&gt; $data['content_options'],
              'link_button_text' =&gt; $data['link_button_text'],
              'text_button_text' =&gt; $data['text_button_text'],
              'options' =&gt; $data['options'],
              'comment_sort_method' =&gt; $data['comment_sort_method'],
              'hide_comment_scores' =&gt; $data['hide_comment_scores'],
              'header_mouseover-text' =&gt; $data['header_mouseover-text']
          ]);
  
          return $lewp;
      }
  
      public function searchLewpsByName($term) {
          $lewp = Lewp::where('name', 'LIKE', $term)-&gt;get();
  
          return $lewp;
      }
  
      public function getLewpByName($lewpname) {
          $lewp = Lewp::where('name', '=', $lewpname)-&gt;first();
  
          return $lewp;
      }
  
      public function getLewpId($lewpname) {
          $lewp = Lewp::select(array('id')-&gt;where('name', '=', $lewpname)-&gt;first();
  
          return $lewp;
      }
  
  }
  </code></pre>