Blog Package
The enso blog package provides a basic blog functionality.
Installation
Install the Blog package
composer require yadda/enso-blogAdd to
config/enso/crud.php'post' => [ 'controller' => '\Yadda\Enso\Blog\Controllers\Admin\PostController', 'config' => '\Yadda\Enso\Blog\Crud\Post', 'model' => '\Yadda\Enso\Blog\Models\Post', ],Publish assets
php artisan vendor:publish --tag enso-blogAdd routes to
routes/web.phpEnsoCrud::crudRoutes('admin/posts', 'post', 'admin.posts'); EnsoBlog::routes('posts', '\Yadda\Enso\Blog\Controllers\PostController', 'posts');Add item to admin in the
app/Providers/EnsoServiceProviderpublic function boot() { //... EnsoMenu::addItems([ [ 'route' => ['admin.posts.index'], 'label' => 'Posts', 'icon' => 'fa fa-files-o', 'order' => 51, ], ]); }
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.