PHPackages                             eolica/laravel-content-tools - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. eolica/laravel-content-tools

ActiveLibrary[Localization &amp; i18n](/categories/localization)

eolica/laravel-content-tools
============================

A Laravel package for editing your web frontend translations directly on the page

v0.5.0(2y ago)34.1kMITPHPPHP ^8.0

Since Sep 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Eolica-Web/laravel-content-tools)[ Packagist](https://packagist.org/packages/eolica/laravel-content-tools)[ Docs](https://github.com/Eolica-Web/laravel-content-tools)[ RSS](/packages/eolica-laravel-content-tools/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (8)Versions (8)Used By (0)

Laravel Content Tools
=====================

[](#laravel-content-tools)

[![Latest Version on Packagist](https://camo.githubusercontent.com/848a5e4e1e0ca9e8cb9e4120ad057fc8652f723971ac8b98404329a7d1465394/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656f6c6963612f6c61726176656c2d636f6e74656e742d746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eolica/laravel-content-tools) [![Total Downloads](https://camo.githubusercontent.com/81b1b4cb15026e1662d0900d4cae0b40fc18cf05a54586c36c9ccb4e3d976b33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656f6c6963612f6c61726176656c2d636f6e74656e742d746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eolica/laravel-content-tools)

A Laravel package for editing your web frontend translations directly on the page. It uses [ContentTools](https://getcontenttools.com/), a Javascript library that provides a WYSIWYG editor that can be added to any page so we can edit the HTML content inline.

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

[](#installation)

You can install the package via [Composer](https://getcomposer.org/):

```
composer require eolica/laravel-content-tools
```

Once installed, if you are not using automatic [package discovery](https://laravel.com/docs/8.x/packages#package-discovery), then you need to register the `Eolica\LaravelContentTools\ContentToolsServiceProvider` service provider in your `config/app.php`.

```
'providers' => [
    ...

    /*
    * Package Service Providers...
    */
    Eolica\LaravelContentTools\ContentToolsServiceProvider::class,

    ...
],
```

Or, alternatively, you may register it in your `App\Providers\AppServiceProvider`:

```
namespace App\Providers;

use Eolica\LaravelContentTools\ContentToolsServiceProvider;

final class AppServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->app->register(ContentToolsServiceProvider::class);
    }

    ...
}
```

### Public assets

[](#public-assets)

Since this package uses public assets you must publish them by using the following artisan command:

```
php artisan vendor:publish --tag=content-tools:assets --force
```

To keep the assets up-to-date and avoid issues in future updates, we recommend adding the command to the `post-autoload-dump` scripts in your composer.json file:

```
"scripts": {
    "post-autoload-dump": [
        "@php artisan vendor:publish --tag=content-tools:assets --force --ansi"
    ]
}
```

The package will inject the published assets into the `styles` and `scripts` stacks, so you must add these to your layout:

```

    ...
    @stack('styles')

    ...
    @stack('scripts')

```

Configuration
-------------

[](#configuration)

You may publish the `content-tools` config file with the following command:

```
php artisan vendor:publish --tag=content-tools:config
```

This will create a `config/content-tools.php` file in your app that you can modify to set your configuration.

This is the config file with the default values:

```
