title: Getting In Container.php line 752: Class RoleTableSeeder does not exist error, when trying to seed a role in Laravel
body: <p>Currently, I am trying to create roles for my application, unfortunately I am having some troubles. Whenever I run php artisan migrate --seed, I get the error I've written in the title. Honestly, I feel like I've messed up something really simple like a name but I just can't find my mistake. I'd appreciate any help.</p>
  
  <p>User.php model:</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  
  class User extends Model implements Authenticatable
  {
      public function roles(){
          return $this-&gt;belongsToMany('App\Role');
      }
  }
  </code></pre>
  
  <p>Role.php model:</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Role extends Model
  {
      public function users(){
          return $this-&gt;belongsToMany('App\User');
      }
  }
  </code></pre>
  
  <p>Users table:</p>
  
  <pre><code>public function up()
      {
          Schema::create('users', function (Blueprint $table) {
              $table-&gt;increments('id');
              $table-&gt;string('first_name');
              $table-&gt;string('last_name');
              $table-&gt;string('username');
              $table-&gt;string('password');
              $table-&gt;string('email');
              $table-&gt;timestamps();
              $table-&gt;rememberToken();
          });
      }
  </code></pre>
  
  <p>Roles table:</p>
  
  <pre><code>public function up()
      {
          Schema::create('roles', function (Blueprint $table) {
              $table-&gt;increments('id');
              $table-&gt;string('name');
              $table-&gt;string('description')-&gt;nullable()-&gt;default(null);
              $table-&gt;timestamps();
          });
      }
  </code></pre>
  
  <p>role_user table</p>
  
  <pre><code>public function up()
  {
      Schema::create('role_user', function (Blueprint $table) {
          $table-&gt;increments('id');
          $table-&gt;integer('user_id');
          $table-&gt;integer('role_id');
          $table-&gt;timestamps();
      });
  }
  </code></pre>
  
  <p>RoleTableSeeder.php</p>
  
  <pre><code>    &lt;?php
  
  use Illuminate\Database\Seeder;
  use App\Role;
  
  class RoleTableSeeder extends Seeder
  {
      /**
       * Run the database seeds.
       *
       * @return void
       */
      public function run()
      {
          $role_user = new Role();
          $role_user-&gt;name = 'User';
          $role_user-&gt;description = "Normal User";
          $role_user-&gt;save();
  
          $role_admin = new Role();
          $role_admin-&gt;name = 'Admin';
          $role_admin-&gt;description = "Admin User";
          $role_admin-&gt;save();
      }
  }
  </code></pre>
  
  <p>UserTableSeeder.php</p>
  
  <pre><code>public function run()
      {
          $role_admin = Role::where('name', 'Admin')-&gt;first();
  
          $user = new User();
          $user-&gt;first_name = 'test';
          $user-&gt;last_name = 'test';
          $user-&gt;username = 'Admin';
          $user-&gt;password = bcrypt('test');
          $user-&gt;email = 'test@gmail.com';
          $user-&gt;save();
          $user-&gt;roles()-&gt;attach($role_admin);
      }
  </code></pre>
  
  <p>DatabaseSeeder.php</p>
  
  <pre><code>public function run()
      {
          $this-&gt;call(RoleTableSeeder::class);
          $this-&gt;call(UserTableSeeder::class);
      }
  }
  </code></pre>