Use ckfinder in laravel 5.2 -


here code in config.php:

$path = '/laravel/'; require _dir_.'/../../../../bootstrap/autoload.php'; $app = require_once _dir_.'/../../../../bootstrap/app.php';  $app->make('illuminate\contracts\http\kernel')->handle(illuminate\http\request::capture()); $_user = (auth::check()) ? auth::user()->username : ''; define('ckfinder_root_folder', $path.'resources/assets/uploads/'  . $_user .'/'); $config['authentication'] = function () {           return auth::check(); }; 

it works can't upload file (upload finished errors). if remove ->handle(illuminate\http\request::capture() test, run in session (not refresh page). problem. please help.

issue looks permission need set 0777 on ckfinder_root_folder

you may need add namespace --

use illuminate\support\facades\file;   $path = '/laravel/'; require _dir_.'/../../../../bootstrap/autoload.php';     $app = require_once _dir_.'/../../../../bootstrap/app.php';      $app->make('illuminate\contracts\http\kernel')->handle(illuminate\http\request::capture());     $_user = (auth::check()) ? auth::user()->username : '';      define('ckfinder_root_folder', $path.'resources/assets/uploads/'  . $_user);      if(!file::exists($filepath)) {         file::makedirectory(ckfinder_root_folder, $mode = 0777, true,true);     }      $config['authentication'] = function () {               return auth::check(); }; 

Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -