Download the PHP package ckfinder/ckfinder-laravel-package without Composer

On this page you can find all versions of the php package ckfinder/ckfinder-laravel-package. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ckfinder-laravel-package

CKFinder 3 Package for Laravel 9+ Tweet

[Laravel version]() License Packagist Packagist Join newsletter Follow twitter

This repository contains the CKFinder 3 Package for Laravel 9+. If you are looking for a package for older version of Laravel, please use version 3.

Installation

  1. Add a Composer dependency and install the package.

  2. Run the command to download the CKFinder code.

    After installing the Laravel package you need to download CKFinder code. It is not shipped with the package due to different license terms. To install it, run the following artisan command:

    It will download the required code and place it inside an appropriate directory of the package (vendor/ckfinder/ckfinder-laravel-package/).

  3. Publish the CKFinder connector configuration and assets.

    This will publish CKFinder assets to public/js/ckfinder, and the CKFinder connector configuration to config/ckfinder.php.

    You can also publish the views used by this package in case you need custom route names, different assets location, file browser customization etc.

    Finally, you can publish package's configuration, assets and views using only one command.

  4. Create a directory for CKFinder files and allow for write access to it. By default CKFinder expects the files to be placed in public/userfiles (this can be altered in the configuration).

    NOTE: Since usually setting permissions to 0777 is insecure, it is advisable to change the group ownership of the directory to the same user as Apache and add group write permissions instead. Please contact your system administrator in case of any doubts.

  5. CKFinder by default uses a CSRF protection mechanism based on double submit cookies. On some configurations it may be required to configure Laravel not to encrypt the cookie set by CKFinder.

    To do that, please add the cookie name ckCsrfToken to the $except property of EncryptCookies middleware:

    You should also disable Laravel's CSRF protection for CKFinder's path, as CKFinder uses its own CSRF protection mechanism. This can be done by adding ckfinder/* pattern to the $except property of VerifyCsrfToken middleware: (app/Http/Middleware/VerifyCsrfToken.php)

At this point you should see the connector JSON response after navigating to the <APP BASE URL>/ckfinder/connector?command=Init address. Authentication for CKFinder is not configured yet, so you will see an error response saying that CKFinder is not enabled.

Configuring Authentication

CKFinder connector authentication is handled by middleware class or alias. To create the custom middleware class, use the artisan command:

The new middleware class will appear in app/Http/Middleware/CustomCKFinderAuth.php. Change the authentication option in config/ckfinder.php:

The handle method in CustomCKFinderAuth class allows to authenticate CKFinder users. A basic implementation that returns true from the authentication callable (which is obviously not secure) can look like below:

Please have a look at the CKFinder for PHP connector documentation to find out more about this option.

Note: Alternatively, you can set the configuration option $config['loadRoutes'] = false; in config/ckfinder.php. Then you copy the routes from vendor/ckfinder/ckfinder-laravel-package/src/routes.php to your application routes such as to protect them with your Laravel auth middleware.

Configuration Options

The CKFinder connector configuration is taken from the config/ckfinder.php file.

To find out more about possible connector configuration options please refer to the CKFinder for PHP connector documentation.

Usage

The package code contains a couple of usage examples that you may find useful. To enable them, uncomment the ckfinder_examples route in vendor/ckfinder/ckfinder-laravel-package/src/routes.php:

After that you can navigate to the <APP BASE URL>/ckfinder/examples path and have a look at the list of available examples. To find out about the code behind them, check the views/samples directory in the package (vendor/ckfinder/ckfinder-laravel-package/views/samples/).

Including the Main CKFinder JavaScript File in Templates

To be able to use CKFinder on a web page you have to include the main CKFinder JavaScript file. The preferred way to do that is to include the CKFinder setup template, as shown below:

The included template renders the required script tags and configures a valid connector path.


Useful Links


All versions of ckfinder-laravel-package with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1.0
laravel/framework Version ^9.0|^10.0|^11.0
pimple/pimple Version ~3.0
league/flysystem Version ^3.0
league/flysystem-aws-s3-v3 Version ^3.0
league/flysystem-azure-blob-storage Version ^3.0
league/flysystem-ftp Version ^3.0
spatie/flysystem-dropbox Version ^2.0
ext-json Version *
ext-gd Version *
ext-zip Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ckfinder/ckfinder-laravel-package contains the following files

Loading the files please wait ....