diff --git a/composer.json b/composer.json index ea4266e..a89863b 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "barryvdh/laravel-elfinder", + "name": "araxteam/laravel-elfinder", "keywords": ["laravel", "elfinder", "tinymce", "filebrowser"], "description": "A Laravel Package to integrate elFinder 2", "license": "MIT", @@ -7,6 +7,10 @@ { "name": "Barry vd. Heuvel", "email": "barryvdh@gmail.com" + }, + { + "name": "Morteza Najaf Goli Zadeh", + "email": "mortazangz@gmail.com" } ], "require": { diff --git a/config/elfinder.php b/config/elfinder.php index e94f8d8..cbdef2b 100644 --- a/config/elfinder.php +++ b/config/elfinder.php @@ -10,7 +10,7 @@ | The dir where to store the images (relative from public) | */ - 'dir' => ['files'], + 'dir' => [public_path('files')=>'files'], /* |-------------------------------------------------------------------------- diff --git a/readme.md b/readme.md index c039fac..5f3c649 100644 --- a/readme.md +++ b/readme.md @@ -14,10 +14,17 @@ Files are updated from the a seperate [build repository](https://github.com/barr ### Installation -Require this package with Composer +Begin by installing this package through Composer. Edit your project's composer.json file to require araxteam/laravel-elfinder + + "require": { + "araxteam/laravel-elfinder": "dev-master" + } - composer require barryvdh/laravel-elfinder +Next, update Composer from the Terminal: + +composer update + Add the ServiceProvider to the providers array in app/config/app.php ```php diff --git a/src/ElfinderController.php b/src/ElfinderController.php index 2b91988..0c419f0 100644 --- a/src/ElfinderController.php +++ b/src/ElfinderController.php @@ -76,11 +76,11 @@ public function showConnector() $roots = $this->app->config->get('elfinder.roots', []); if (empty($roots)) { $dirs = (array) $this->app['config']->get('elfinder.dir', []); - foreach ($dirs as $dir) { + foreach ($dirs as $key_dir=>$value_dir) { $roots[] = [ 'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED) - 'path' => public_path($dir), // path to files (REQUIRED) - 'URL' => url($dir), // URL to files (REQUIRED) + 'path' => $key_dir, // path to files (REQUIRED) + 'URL' => url($value_dir), // URL to files (REQUIRED) 'accessControl' => $this->app->config->get('elfinder.access') // filter callback (OPTIONAL) ]; }