original_string: public static function check($permissions)
      {
          if (Schema::hasTable('laralum_permissions')) {
              foreach ($permissions as $permission) {
                  if (!self::allCached()->contains('slug', $permission['slug'])) {
                      Cache::forget('laralum_permissions');
                      if (!self::allCached()->contains('slug', $permission['slug'])) {
                          Permission::create([
                              'name'        => $permission['name'],
                              'slug'        => $permission['slug'],
                              'description' => $permission['desc'],
                          ]);
                      }
                  }
              }
          }
          session(['laralum_permissions::mandatory' => array_merge(static::mandatory(), $permissions)]);
      }
code: public static function check($permissions)
      {
          if (Schema::hasTable('laralum_permissions')) {
              foreach ($permissions as $permission) {
                  if (!self::allCached()->contains('slug', $permission['slug'])) {
                      Cache::forget('laralum_permissions');
                      if (!self::allCached()->contains('slug', $permission['slug'])) {
                          Permission::create([
                              'name'        => $permission['name'],
                              'slug'        => $permission['slug'],
                              'description' => $permission['desc'],
                          ]);
                      }
                  }
              }
          }
          session(['laralum_permissions::mandatory' => array_merge(static::mandatory(), $permissions)]);
      }
code_tokens: public static function check ( $ permissions ) { if ( Schema :: hasTable ( 'laralum_permissions' ) ) { foreach ( $ permissions as $ permission ) { if ( ! self :: allCached ( ) -> contains ( 'slug' , $ permission [ 'slug' ] ) ) { Cache :: forget ( 'laralum_permissions' ) ; if ( ! self :: allCached ( ) -> contains ( 'slug' , $ permission [ 'slug' ] ) ) { Permission :: create ( [ 'name' => $ permission [ 'name' ] , 'slug' => $ permission [ 'slug' ] , 'description' => $ permission [ 'desc' ] , ] ) ; } } } } session ( [ 'laralum_permissions::mandatory' => array_merge ( static :: mandatory ( ) , $ permissions ) ] ) ; }
docstring: Checks if the permisions exists and if they dont, they will be added.
  
  @param array $permissions
docstring_tokens: Checks if the permisions exists and if they dont they will be added .