title: Call to undefined method App\Role::lists() in Laravel 7
body: <p>AdminUsersController.php</p>
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\User;
  use App\Role;
  
      class AdminUsersController extends Controller
      {
          /**
           * Display a listing of the resource.
           *
           * @return \Illuminate\Http\Response
           */
          public function index()
          {
              //
      
              $users = User::all();
              return view('admin.users.index',compact('users'));
          }
      
          /**
           * Show the form for creating a new resource.
           *
           * @return \Illuminate\Http\Response
           */
          public function create()
          {
              //
      
              $roles = Role::lists('name','id')-&gt;all();
              return view('admin.users.create',compact('roles'));
          }
      
      }
  </code></pre>
  <p>admin.users.create.php</p>
  <pre><code>&lt;x-admin&gt;
  
  @section('content')
  
  &lt;h1&gt;Create Users&lt;/h1&gt;
  
  {!!Form::open(['method'=&gt;'POST','action'=&gt;'AdminUsersController@store'])!!}
          
          
          &lt;div class=&quot;form-group&quot;&gt;
              {!!Form::label('name','Name')!!}
              {!!Form::text('name',null,['class'=&gt;'form-control'])!!}
          &lt;/div&gt;
  
          &lt;div class=&quot;form-group&quot;&gt;
              {!!Form::label('role_id','Role')!!}
              {!!Form::select('role_id',[''=&gt;'Choose Options']+$roles,null,['class'=&gt;'form-control'])!!}
          &lt;/div&gt;
  
         
  
          &lt;div class=&quot;form-group&quot;&gt;
  
              {!!Form::submit('Create User',['class'=&gt;'btn btn-primary'])!!}
          
          &lt;/div&gt;
  
  {!!Form::close()!!}
  @endsection
  &lt;/x-admin&gt;
  </code></pre>
  <p>I'm trying to get the Role name in my Role Table and display to the select Role form in the admin.users.create.php but this error appears in my screen &quot;Call to undefined method App\Role::lists() in Laravel 7&quot; , How to fix this kind of error in Laravel 7.</p>