/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function dashboard()
 {
     $users = \App\User::all()->count();
     $roles = \Spatie\Permission\Models\Role::all()->count();
     $permissions = \Spatie\Permission\Models\Permission::all()->count();
     $entities = \Amranidev\ScaffoldInterface\Models\Scaffoldinterface::all();
     return view('scaffold-interface.dashboard.dashboard', compact('users', 'roles', 'permissions', 'entities'));
 }
 /**
  * Rollback schema.
  *
  * @throws Exception
  *
  * @return \Illuminate\Http\Response
  */
 public function rollback()
 {
     try {
         if (!Scaffoldinterface::all()->count()) {
             throw new \Exception('Nothing to rollback');
         }
         Artisan::call('migrate:rollback');
     } catch (\Exception $e) {
         return $e->getMessage();
     }
     $Msg = str_replace("\n", '', Artisan::output());
     Session::flash('status', $Msg);
     return redirect('scaffold');
 }