ibnujakaria / file-manager
A simple laravel file manager
Installs: 503
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 0
Open Issues: 12
Language:Vue
Requires
- php: ^7.2||^8.0
Requires (Dev)
- laravel/framework: ^7.0 || ^8.0 || ^9.0
README
Instalation
composer require ibnujakaria/file-manager
Publish Configuration and Assets
php artisan vendor:publish --provider="Ibnujakaria\FileManager\FileManagerServiceProvider"
Define routing:
# routes/web.php \FileManager::routes(); # or you can group it wherever you want Route::prefix('admin')->group(function () { \FileManager::routes(); })->middleware('auth:admin');
Basic Usage
Load Assets
<html> <!-- bootstrap css --> <link rel="stylesheet" href="dist/bootstrap.min.css"> <!-- jquery --> <script src="dist/jquery.min.js"></script> <!-- bootstrap js --> <script src="dist/bootstrap.min.js"></script> <!-- File Manager js --> <script src="{{ asset('file-manager/file-manager.js') }}"></script> </html>
Run File Manager
<!-- html --> <div id="file-manager-app"></div> <!-- script --> <script> let fileManager = new FileManager('#file-manager-app') fileManager.show() </script>
Run File Manager in Modal and pick a file
let fileManager = new FileManager() fileManager.pickFile().then(file => { console.log(file.public_path) }) // or using async/await let fileManager = new FileManager() let file = await fileManager.pickFile()
License
The Multiple Select Js library is open-source software licensed under the MIT License.