My Blog Posts

Trix Editor for Laravel

Trix Editor for Laravel

Since Trix CSS and JavaScript already can integrate with Laravel, however laravel-trix it is a package that makes it easier to set it up.

First, install the Composer package:

composer require te7a-houdini/laravel-trix
php artisan vendor:publish --provider="Te7aHoudini\LaravelTrix\LaravelTrixServiceProvider"
php artisan migrate
After you install the package, it looks like you have an Article Model, and you want the Trix editor to create and update the forms on it. All you have to do is use Blade:
     head>body>form method="POST" action="route('')">
            @trix(\App\Article::class, 'content')
             input type="submit">form>body>html>
The package includes many other features, such as using uploaded files, creating for existing models, and configuring advanced. More information about this package Find it on the Github page and the entire user manual.

Share this article

Comments (0)