title: Yajra No available engine for App\User
body: <p>I've made for my cms admins role 
  now i have 2 admin roles super admin and normal admin 
  i have a page that manage users both super admin and normal admin can see it but with different data </p>
  
  <p>here's the controller code </p>
  
  <pre><code>  public function index()
      {        
           $this-&gt;super_admin_role_check();
          return view('admin.users.index');   
      }
  
  
  
      public function usersList(){
          $super_admin_role = Role::where('name','super_admin')-&gt;first();
          $is_super_admin=$this-&gt;isSuperAdmin();
  
          if($is_super_admin){
              $data = User::all();
          }else{
              // Admin can get all users except super admin
              $super_admin = DB::table('role_user')-&gt;where('role_id',$super_admin_role-&gt;id)-&gt;first();
              $data = User::where('id','!=',$super_admin-&gt;user_id)-&gt;first();
          }
  
          if(!$data){
              $data=[];
          }
          return DataTables::of($data)-&gt;make(true);
      }   
  
  
  
  
      // This function check if the super_admin roles exist or not
      public function super_admin_role_check(){
  
          $user = Auth::guard()-&gt;user();
  
          $super_admin_role = Role::where('name','super_admin')-&gt;first();
  
          if(!$super_admin_role){
  
              \Artisan::call('db:seed'); 
  
              // if there's no role factory create super_admin role and assign it to the super admin user
              $super_admin_role = Role::where('name','super_admin')-&gt;first();
  
              DB::table('role_user')-&gt;insert([
              'user_id'=&gt;$user-&gt;id,'role_id'=&gt;$super_admin_role-&gt;id
              ]);
  
              $permissions = Permission::all();
  
              // here i give all permissions to the super admin
              foreach($permissions as $permission){
  
              DB::table('permission_role')-&gt;insert(['permission_id'=&gt;$permission-&gt;id,
              'role_id'=&gt;$super_admin_role-&gt;id
              ]);
              }
          }
          return $super_admin_role;
      }
  
  
  
  
  
  
  
  
      // This Function Check if the user is super admin?
      public function isSuperAdmin(){
          $user = Auth::guard()-&gt;user();
          $super_admin_role = Role::where('name','super_admin')-&gt;first();
          $is_super_admin = DB::table('role_user')-&gt;where('user_id',$user-&gt;id)-&gt;where('role_id',$super_admin_role-&gt;id)-&gt;first();
          return $is_super_admin;
      }
  </code></pre>
  
  <p>The problem is that when i'm login as super admin everythings goes well but when i'm login as normal admin i get error "No available engine for App\User"
   in    \vendor\yajra\laravel-datatables-oracle\src\DataTables.php
  any help please?</p>