PHPackages                             amiirarsallan/laravel-cksource - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. amiirarsallan/laravel-cksource

ActiveLibrary[Templating &amp; Views](/categories/templating)

amiirarsallan/laravel-cksource
==============================

CKEditor &amp; CKFinder integrated for Laravel framework.

0109CSS

Since Mar 30Pushed 8y agoCompare

[ Source](https://github.com/amiirarsallan/laravel-cksource)[ Packagist](https://packagist.org/packages/amiirarsallan/laravel-cksource)[ RSS](/packages/amiirarsallan-laravel-cksource/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel CKSource (CKEditor &amp; CKFinder) package
==================================================

[](#laravel-cksource-ckeditor--ckfinder-package)

This package provides two products of [CKSource](https://cksource.com/), called CKEditor thats one of the world best WYSIWYG editors and CKFinder that creates a very easy, safe file upload and management trought the CKEditor and by itself, for [Laravel](https://laravel.com/) 5.4+ framework.

- [Installation](#installation)
- [Updating](#updating)
- [Usage](#usage)
- [Notes](#notes)

Installation
------------

[](#installation)

### Require package via composer

[](#require-package-via-composer)

```
composer require amiirarsallan/laravel-cksource

```

### Publishing assets

[](#publishing-assets)

Run this artisan command inside your main laravel project directory

```
php artisan vendor:publish --tag=laravel-cksource

```

### Note

[](#note)

**By running this command you'll have a new directory named `files` inside your laravel project `storage` directory, this directory will used for CKFinder uploads path.**

### Configurating CKFinder

[](#configurating-ckfinder)

Open CKFinder `config.php` file available in this path `/public/vendor/amiirarsalan/laravel-cksource/src/assets/ckfinder/`in line 29 Replace **YOUR\_APP\_KEY** with your own application key stores in .env file of project, without **base64:** flag

```
$config['authentication'] = function () {
    $APP_KEY = "YOUR_APP_KEY";

```

Then, we have the most important part for authentication,

1- **Set Cookie to authenticate user in login**

In your user login process you have to redirect user after successful login attempt, so by that way you have to redirect with a cookie set, with command `withCookie()` and the cookie should be named **allowCkfinder** with **true** value, and the code snippet should be something like this

```
//Attempt to login user
if (!auth()->attempt($credentials, request('remember'))) {
    return back()->withErrors([
        'message' => 'Please check your credentials.'
    ]);
}

//Redirect to panel
return redirect()->withCookie(cookie()->forever('allowCkfinder', true));

```

2- **Unset Cookie while user logout**

To make the process works completely, you have to remove the cookie while user logout, and the snippet should be something like this

```
//Log out the user
auth()->logout();

//Redirect to index
return redirect()->withCookie(cookie()->forget('allowCkfinder'));

```

Updating
--------

[](#updating)

### Update composer at first level

[](#update-composer-at-first-level)

```
composer update amiirarsallan/laravel-cksource

```

### Publish new assets with flag --force to overwrite existing files

[](#publish-new-assets-with-flag---force-to-overwrite-existing-files)

```
php artisan vendor:publish --tag=laravel-cksource --force

```

Usage
-----

[](#usage)

Package generates new custom Laravel Blade syntax,

```
@ckeditor( [arg1](textarea name), [arg2](textarea id), [arg3]{optional}(ckeditor custom configs)  )

```

This syntax creates a new `` HTML element in your view and its `name` and `id` attributes will populate trough first two arguments of `@ckeditor` syntax.

3rd argument will be the CKFinder custom configurations.

**NOTE**CKFinder and browse server button of CKEditor will be available while `Auth::check()` return true result, so it means when a user authenticated then CKFinder will be enabled.

Notes
-----

[](#notes)

### Disable CKFinder activation via Laravel Auth (NOT RECOMMENDED)

[](#disable-ckfinder-activation-via-laravel-auth-not-recommended)

To disable CKFinder activation via Laravel Auth, just go trough this path in your laravel project

```
/public/vendor/amiirarsallan/laravel-cksource/src/assets/ckfinder/

```

and open config.php file inside this directory, then remove the whole code `$config['authentication']` in line **28**and just write

```
$config['authentication'] = function () {
    return true;
};

```

### Invalid Request | Interface 'CKSource\\CKFinder\\Request\\Transformer\\TransformerInterface' not found

[](#invalid-request--interface-cksourceckfinderrequesttransformertransformerinterface-not-found)

This error usually occures while you hit Browse Server button from CKEditor dialog, to fix this you have to Open CKFinder config `/public/vendor/amiirarsalan/laravel-cksource/src/assets/ckfinder/config.php`and comment line 13, 14

```
// Production
// error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
// ini_set('display_errors', 0);

```

and uncomment line 17, 18

```
// Development
error_reporting(E_ALL);
ini_set('display_errors', 1);

```

Save the config file and try re-open the Browse Server dialog from CKEditor, If the error shown on screen display something like this,

**Fatal error: Interface 'CKSource\\CKFinder\\Request\\Transformer\\TransformerInterface' not found in X:\\X\\public\\vendor\\amiirarsallan\\laravel-cksource\\src\\assets\\ckfinder\\core\\connector\\php\\vendor\\cksource\\ckfinder\\src\\CKSource\\CKFinder\\Request\\Transformer\\JsonTransformer.php on line 24**

Go to the path

`X:\X\public\vendor\amiirarsallan\laravel-cksource\src\assets\ckfinder\core\connector\php\vendor\cksource\ckfinder\src\CKSource\CKFinder\Request\Transformer\JsonTransformer.php`

and open `JsonTransformer.php` file, on line 24, change the code like this

```
class JsonTransformer //implements TransformerInterface
{

```

This will fix the Browse Server dialog.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5569682a7f7a4a51babee5548beed703f75e6ad5553f4cf9d83bb5082e4543fa?d=identicon)[amiirarsallan](/maintainers/amiirarsallan)

---

Top Contributors

[![amirarsalanebrahimi](https://avatars.githubusercontent.com/u/37512274?v=4)](https://github.com/amirarsalanebrahimi "amirarsalanebrahimi (9 commits)")

### Embed Badge

![Health badge](/badges/amiirarsallan-laravel-cksource/health.svg)

```
[![Health](https://phpackages.com/badges/amiirarsallan-laravel-cksource/health.svg)](https://phpackages.com/packages/amiirarsallan-laravel-cksource)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
