FatalErrorException in EventController.php line 22: Class 'App\Event' not found
<p>I am in stuck with defining model in controller . I have tried several solutions in stackoverflow but nothing helps.</p>

<p>My <strong>Route</strong></p>

<pre><code>Route::resource('/events' , 'EventController');
</code></pre>

<p>My model: <strong>Event.php</strong></p>

<pre><code>&lt;?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Event extends Model
{
    protected $table = 'events';

    protected $hidden = ['remember_token'];

    protected $guarded = array('id');

    protected $fillable = array();

    public static $rules = array(
        'name' =&gt; 'required|min:5',
        'price' =&gt; 'required|number'
      );
}
</code></pre>

<p>In my <strong>Controller</strong> : </p>

<pre><code>&lt;?php

namespace App\Http\Controllers;

use App\Event;

use App\Http\Requests;

use Illuminate\Http\Request;

use View;

use Validator;

use Redirect;

class EventController extends Controller
{
    //Show lists of the events
    public function index()
    {
        $events = \App\Event::all();

        return view('admins.events.index' , compact($events));
    }
}
</code></pre>

<p>I think the problem is like I am missing something in my model. Can you please point out the error ? </p>

<p>Your help is appreciated. Thanks.</p>