blublog/blublog

BLUblog is simple laravel blog package with admin panel.


Keywords
admin, package, blog, panel, laravel, posts, blog-platform, blogs, laravel-blog, laravel6, laravel6-blog, laravel6-package
License
MIT

Documentation

About BLUBLOG

This is the 2.0 version dev branch. The package is been rewritten. It's still in alpha.

BLUblog is laravel blog package with admin panel. Includes all views, controllers, routes and everything needed for a blog.

Require

  • Laravel 7 or newer. It's build on Laravel 8.
  • Livewire.
  • laravelcollective/html
  • intervention/image
  • user model with auth.

You can install all you need with:

composer require livewire/livewire
composer require laravelcollective/html
composer require intervention/image

Check below if you don't have authentication.

Instaling

  1. Make sure you have the requirements above. Download BLUblog with:
composer require blublog/blublog
  1. In your User model you need to add this trait:
...
use Blublog\Blublog\Traits\ManageBlublog;
...
class User extends Authenticatable
{
    use ManageBlublog;
    ...

If your User model is not in App\Models, edit blublog config file in src/Config/blublog.php.

  1. You need to add this in filesystems.php from config folder:
'blublog' => [
    'driver' => 'local',
    'root' => public_path('/blublog-uploads'),
    'url' => env('APP_URL').'/blublog-uploads/',
    'visibility' => 'public',
],
  1. Make sure you have at least one user and run this:
php artisan blublog:install

Or you can use blublog:setup if you already run migrations and don't wan't to publish files.

Blublog will check for common errors and do all it needs. Only the first user of your user model will have access to blog panel and they will be admin. You can give access to others and set up blog roles and permisions from the panel.

Cool. Everything should work now. By default you can visit your blog panel in example.com/panel and your blog in example.com/blog.

Features

In bold are new for verison 2.

  1. Posts (CRUD)
  • Multible categories with nesting.
  • Multible tags.
  • Summernote - WYSIWYG HTML Editor.
  • Easy adding and removing custom image sizes and settings.
  • Custom SEO post title and description (It's auto generated if not specified).
  • Search.
  • Comments can be allowed or forbidden.
  • Posts have status and type. You can add or remove status. Post status tells who can view/edit post in panel (published, private...).
  • Excerpt of content. Could be empty.
  • You can like post.
  • Similar posts.
  • Views statistics.
  • Post revisions.
  • Generate sitemap (RSS).
  • You can select posts to be recommended or in front page.
  • You can upload images for the post you create/edit.
  • "On this topic" - Select a tag to show other post from the same topic.
  1. Comments (CRUD)
  • Anti-spam modul.
  • Support nesting (can have replies to replies).
  • Author comments have "Author" title.
  1. Categories (CRUD)
  • Background image.
  • Description.
  • Infinite category nesting. This means that one category can have multiple sub categories.
  1. Users (CRUD)
  • Exend and use your User with traid.
  • Add blog roles to your user model.
  • You can create new roles and new permissions.
  1. Image manager
  • Browse and upload images.
  • All images have different sizes. On upload Blublog will create the sizes set in config file.
  1. Panel
  • You can ban users from the blog or from commenting.
  • Logs. They are Errors, Alerts, Info, Visits and Bots visits.

If you don't have authentication and with user model

You can use laravel ui. You can install it like this for Laravel 8:

composer require laravel/ui
php artisan ui bootstrap --auth

And like this for Laravel 7:

composer require laravel/ui "2.0"
php artisan ui bootstrap --auth

Big New things in version 2

  1. Post status

In config file you can set up what status types you gonna use. Every status have access code, edit code and revision setting.

Access codes:

  • 0 - public. Post with that status code can be seen by all.
  • 1 - Restricted. Only seen by mods and admin.
  • 2 - Private. Only seen by the author.
  • 3 - Custom. Blublog will check if user have permission "view-{your-post-status}"

Edit codes:

  • 0 - Can be edited by all users.
  • 1 - Restricted. Post author, mods and admin can edit post.
  • 2 - Custom. Blublog will check if user have permission "edit-{your-post-status}"

Revision setting:

  • With true or false for every status you set if you want blublog to keep revisions for post with that status.
  1. More appropriate for users you don't trust.

With roles and permissions you can make sure that posts from some users WILL wait to be approved. Also you can restrict html output of some roles or totaly disable it.

  1. Extending your user model.

You can check for blog permission of your users like this:

$user->blublogRoles->first()->havePermission('delete-posts')

You also have access to user's images and posts with blublogImages and blublogPosts. More to be added.

  1. Blublog drops support for pages, menu and star rating.

License

The Laravel framework is open-sourced software licensed under the MIT license.