Download the PHP package salmanbe/filename without Composer
On this page you can find all versions of the php package salmanbe/filename. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download salmanbe/filename
More information about salmanbe/filename
Files in salmanbe/filename
Package filename
Short Description Laravel library to generate clean & pretty file name
License MIT
Homepage https://github.com/salmanbe/filename
Informations about the package filename
Pretty File Name
This library generates pretty, clean, user friendly, unique and well formatted file name.
Video Tutorial
Laravel Installation
Install using composer:
There is a service provider included for integration with the Laravel framework. This service should automatically be registered else to register the service provider, add the following to the providers array in config/app.php
:
You can also add it as a Facade in config/app.php
:
Basic Usage
Add use Salmanbe\FileName\FileName;
or use FileName;
at top of the class where you want to use it.
Options
You can generate configuration file by php artisan vendor:publish
command. Global file name generation options can be defined in it. However, you can override options by adding additional array parameter.
Timestamp
You can override default timestamp format that is placed at the end of file name before extension.
Slugify
Removes special characters from file name.
Limit
Limit the total number of characters in file name to avoid very long file name. Default recommended maximum limit is 240.
Separator
You can specify the separator between file name words. Default separator is '-'.
Uppercase
File name is generated by default in lower case. However, you can use this option to generate file name in upper case.
All Options
Global Configuration
Run php artisan vendor:publish --provider="Salmanbe\FileName\FileNameServiceProvider"
to publish configuration file.
If set to false then no timestamp will be added at the end of file name. It is possible to change the timestamp format. This value can be overridden when calling the function.
If set to false then by default first 225 characters will be used. This value can be overridden when calling the function.
If set to true then special characters will be removed from the file name. This value can be overridden when calling the function.
If set then it will be used as separator between file name words. This value can be overridden when calling the function.
If set to true then file name will be in uppercase else lowercase. This value can be overridden when calling the function.
Uninstall
First remove Salmanbe\FileName\FileNameServiceProvider::class,
and
'Filename' => Salmanbe\FileName\FileName::class,
from config/app.php
if it was added.
Then Run composer remove salmanbe/filename
License
Laravel Perfect Filename is licensed under THE MIT License. Please see License File for more information.
Security contact information
To report a security vulnerability, follow these steps.