Download the PHP package ost/laravel-file-manager without Composer
On this page you can find all versions of the php package ost/laravel-file-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ost/laravel-file-manager
More information about ost/laravel-file-manager
Files in ost/laravel-file-manager
Package laravel-file-manager
Short Description This package used to upload,update and delete single or multiple file and more..
License MIT
Homepage https://github.com/Osama-AL-Tawil/laravel-file-manager
Informations about the package laravel-file-manager
Overview
Installation
Publish Package
Migrate to create table in database
Notes
Usage
Upload File
You can upload one or more file
Update File
Update File By Url
You can update the files by passing the files that you want to upload in the request and passing the urls of the files that you want to update to be deleted from storage
Update File By Path
You can update the files by passing the files that you want to upload in the request and passing the paths of the files that you want to update to be deleted from storage
Delete File
Delete File by Url
Delete File by File Path
You can pass file paths directly
Customisation
Set Model Name and ID
We do this to enable you to create relationships between tables
Set max file size
Set disk
Set Allowed File Extensions (MimeType)
Set Request File Key
default value for => file_key: 'file'
Make File Upload or update is optional
default value for => file_is_required: true change to false
Get Url For File
You can get file url and mime type or only url for file by passing file path
The return result => { "url": "http://127.0.0.1:8000/storage/user/1/images/YFSCBjbOCRQ7At7J7uX4cihDcZkf7j.png", "type": "png" }
Encrypt File path
You can encrypt file path but you must to create new disk in filesystem because public disk not with encrypted url To enable this feature
config/laravel_file_manager.php
Create New Disk
config/filesystems.php
.env
When get File Url ,the returned url like this:
{
"url": "http://127.0.0.1:8000/disk_name/eyJpdiI6IktKVlRTOENwUnJ5a3VTOG5CNzJsYVE9PSIsInZhbHVlIjoiY25wbEZlYUsxeEhNUXdhWnBSZHgwNlhwRzk1UDJXY0MyTyt4R1NqQjdDS1owRk4vTFdqQWFQU0d3U2h2Z1FBK0Y0TVZCazBRWFNpR2xwOTlpMHBwS2c9PSIsIm1hYyI6IjdjMDgwYTUzOTcxYjMyNWQ2Y2UwNTI5MDI5NmQ0ZjA5YTA0YzU2NjgxMjAxZGZmN2I2YjU5YTMzMjRiMWRkNjMiLCJ0YWciOiIifQ==",
"type": "png"
}
Advanced
- You can use File Eloquent model
- You can receive requests for get and customizing files through
config/laravel_file_manager.php
Change value from true to false
routes/web.php
Add Route in routes/web to receive request