You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To change the default icon pack, you can call the `AllowedMimeTypes::setDefaultIconPack` method in the `boot` method of your`App\Providers\AppServiceProvider` class.
87
+
Out of the box, the package supports `fontawesome` and `material` icon packs.
88
+
89
+
```php
90
+
use Javaabu\Helpers\AllowedMimeTypes;
91
+
92
+
AllowedMimeTypes::setDefaultIconPack('material');
93
+
```
94
+
95
+
### getIconPrefix(string $icon_pack = ''): string
96
+
97
+
Returns the icon prefix for the given icon pack. If no icon pack is given, returns the prefix for the default icon pack.
To change the icon prefix for a given icon pack, you can call the `AllowedMimeTypes::registerIconPrefix` method in the `boot` method of your`App\Providers\AppServiceProvider` class.
Returns the icon for the given mimetype. If no icon pack is given, uses the default icon pack. If an icon is not defined directly for the given mime type, then it will fallback to the file type of the mime type. If no icon is defined for the file type as well, then will fallback to the `default` icon of the icon pack.
To register your own icons for a given icon pack, you can call the `AllowedMimeTypes::registerIcons` method in the `boot` method of your`App\Providers\AppServiceProvider` class. This will merge any existing with your new icons. If you want to fully override the icons for a given icon pack, then you can set the `merge` option to false.
Given a file type, or an array of types, returns a string of allowed mime types separated by the given delimiter. If no type is given, returns all mimetypes separated by given delimiter.
Returns the max allowed file size in KB for the given file type. If an array of file types is given, it will return the maximum size allowed from all the given file types. By default, for each given file type, the method will look if a `'max_<type>_file_size''` setting is available. Otherwise, it will fallback to the `'max_upload_file_size'` setting.
168
+
Returns the max allowed file size in KB for the given file type. If an array of file types is given or no type is given, it will return the maximum size allowed from all the file types. By default, for each given file type, the method will look if a `'max_<type>_file_size''` setting is available. Otherwise, it will fallback to the `'max_upload_file_size'` setting.
0 commit comments