PHP code example of codefun / filemanager

1. Go to this page and download the library: Download codefun/filemanager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

codefun / filemanager example snippets

 artisan vendor:publish --tag=codefun_fileManager_migration
 artisan migrate
config\app.php
config\app.php

$user = User::find($id);
FileManager::model($user)->upload($fileName, $width = null, $height =  null);
FileManager::coverPic()->upload($fileName, $width = null, $height =  null);
FileManager::profilePic()->upload($fileName, $width = null, $height =  null);
FileManager::deleteAll(Model $model);
FileManager::model($user)->delete(array | string $deleteAbleFileId);
FileManager::model($user)->update(array | string $updateAbleFileId)->upload($fileName, $width = null, $height =  null);