Blog - Installing

The enso blog package provides a basic blog functionality.

Installation

  1. Install the Blog package

    composer require yadda/enso-blog
    
  2. Publish assets

    php artisan vendor:publish --provider "Yadda\Enso\Blog\EnsoBlogServiceProvider" --tag enso-blog
    
  3. Run migrations

    php artisan migrate
    
  4. Add routes to routes/web.php

    EnsoCrud::crudRoutes('admin/posts', 'post', 'admin.posts');
    
    EnsoBlog::routes('posts', Yadda\Enso\Blog\Controllers\PostController::class, 'posts');
    
  5. Add item to admin menu in the app/Providers/EnsoServiceProvider.php

    public function boot()
    {
       //...
    
       EnsoMenu::addItems([
           Config::get('enso.crud.post.menuitem'),
       ]);
    }
    

Thumbnail Sizes

You can control the thumbnail URLs that are return in XHR requests by setting enso.blog.thumbnail_sizes. The keys of this array are the names of the will be used on the frontend and the values are the Enso Media preset names that will be used. Bear in mind that due to a limitation in JavaScript the frontend names (i.e. the keys of this array) cannot must begin with a letter and not a number.