Open and edit file 'ckfinder/config.php':
require dirname(__DIR__, 3) .'/vendor/autoload.php';
$app = require dirname(__DIR__, 3) . '/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$kernel->handle($request = Illuminate\Http\Request::capture());
$config['authentication'] = function () {
if (auth()->guest()) {
return false;
} else {
return auth()->user()->is_admin; // is_admin: attribute in model
}
};
- posted by: Lâm Ngọc Khương
- site: https://ngockhuong.com
- email: [email protected]
Tuyệt vời. Cảm ơn bạn đã chia sẻ!