title: How do I restrict routes to a certain user on laravel
body: <p>I have added a role column to my auth user which extended the role table</p>
  
  <p>Role migration</p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Database\Migrations\Migration;
  use Illuminate\Database\Schema\Blueprint;
  use Illuminate\Support\Facades\Schema;
  
  class CreateRolesTable extends Migration
  {
      /**
       * Run the migrations.
       *
       * @return void
       */
      public function up()
      {
          Schema::create('roles', function (Blueprint $table) {
              $table-&gt;bigIncrements('id');
              $table-&gt;string('description');
              $table-&gt;timestamps();
          });
      }
  
      /**
       * Reverse the migrations.
       *
       * @return void
       */
      public function down()
      {
          Schema::dropIfExists('roles');
      }
  }
  </code></pre>
  
  <p>user migration</p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Database\Migrations\Migration;
  use Illuminate\Database\Schema\Blueprint;
  use Illuminate\Support\Facades\Schema;
  
  class CreateUsersTable extends Migration
  {
      /**
       * Run the migrations.
       *
       * @return void
       */
      public function up()
      {
          Schema::create('users', function (Blueprint $table) {
              $table-&gt;bigIncrements('id');
              $table-&gt;string('name');
              $table-&gt;string('email')-&gt;unique();
              $table-&gt;timestamp('email_verified_at')-&gt;nullable();
              $table-&gt;string('password');
              $table-&gt;rememberToken();
              $table-&gt;unsignedInteger('role_id');
              $table-&gt;timestamps();
          });
      }
  
      /**
       * Reverse the migrations.
       *
       * @return void
       */
      public function down()
      {
          Schema::dropIfExists('users');
      }
  }
  </code></pre>
  
  <p>In my roles I have Admin, and three other different users. I would like to restrict some routes to only the admin. </p>
  
  <p>routes</p>
  
  <pre><code>&lt;?php
  
  /*
  |--------------------------------------------------------------------------
  | Web Routes
  |--------------------------------------------------------------------------
  |
  | Here is where you can register web routes for your application. These
  | routes are loaded by the RouteServiceProvider within a group which
  | contains the "web" middleware group. Now create something great!
  |
  */
  
  Route::get('/', function () {
      return view('welcome');
  });
  
  Auth::routes();
  
  Route::resource('/admin', 'AdminController');
  
  Route::resource('/farm', 'FarmController');
  
  Route::resource('/clinic', 'ClinicController');
  
  Route::resource('/slaughter', 'SlaughterController');
  
  Route::get('/home', 'HomeController@index')-&gt;name('home');
  </code></pre>
  
  <p>How can I deal with that, restrict the route using admin controller to only the admin</p>