Getting Started

Summary: A full package for Laravel to add a complete blog system to your Laravel website in around 5 minutes! Includes everything you need, Post create, comment, search, detail page etc.

Minimum Requirements

Laravel 5.6, 5.7.

There are a few requirements in the composer.json file, but it should work with all Laravel 5.6 or higher installations.

Features

  • Includes all views, routes, models, controllers, events, etc
    • Public facing pages:
      • View all posts (paginated)
      • View all posts in category (paginated)
      • View single post
      • Add comment views / confirmation views
      • Search (full text search), search form, search results page.
    • Admin pages:
      • Posts (CRUD Blog Posts, Upload Featured Images (auto resizes)
        • View all posts,
        • Create new post,
        • Edit post,
        • Delete post
      • Categories (CRUD Post Categories)
        • View all categories,
        • Create new category,
        • Edit post,
        • Delete post
      • Comments (including comment approvals)
        • View all comments,
        • Approve/Moderate comment,
        • Delete comment
      • Upload images
        • as well as uploading featured images for each blog post (and auto resizing to multiple defined sizes), you can upload images separately.
        • view all uploaded images (in multiple sizes)
  • Includes admin panel
    • Create / edit posts
    • Create / edit post categories
    • Manage (approve/delete) submitted comments
  • Allows each blog post to have featured images uploaded (you can define the actual dimensions) - in large, medium, thumbnail sizes
  • fully configurable via its config/blogetc.php config file.
  • Includes all required view files, works straight away with no additional setup. All view files (Blade files) use Bootstrap 4, and very clean HTML (easy to get your head around). You can easily override any view file by putting files in your /resources/views/vendor/blogetc/ directory
  • Built in comments (using the database), can auto approve or require admin approval (comment moderation).
    • Other options include using Disqus comments or disabling comments.
  • Includes unit tests.
  • Fires events for any database changes, so you can easily add Event Listeners if you need to add additional logic.
  • < 5 minute install time and your blog is up and working, ready for you to go to the admin panel and write a blog post - see full details below, but this is a summary of the required steps:
    • install with composer,
    • do the database migration, copy the config file over (done with php artisan vendor:publish)
    • chmod/chown the public/blog_images/ directory so featured images can be uploaded for each blog post
    • and then add 1 method to your \App\User file (canManageBlogEtcPosts()
    • but please see the install instructions to get everything up and working

What/who this package is for:

  • For websites running Laravel (5.6)
  • Who want to have a site blog, and have an easy to use interface to write blog posts/assign categories/manage existing posts
  • Where only admin users can edit/manage the blog (this is not suitable for every user on your site to be able to manage posts)
  • Where you understand that posts can (potentially) contain JS or any other code, so you should only allow trusted admin users to add/edit/delete/manage the blog posts

What this package is NOT for:

  • Sites where you want your (normal, non-admin) users to write blog posts. You must set canManageBlogEtcPosts()on your user model to ONLY allow trusted users.

Important notes

  1. Anyone who can manage blog posts (defined by the canManageBlogEtcPosts() method you add to your User model) can submit any HTML which is echoed out. This is a security issue. If you don't trust the content you should add a custom view and escape the blog content before echoing it, and set use_custom_view_files in the config to false.

  2. if use_custom_view_files is enabled in the config (which it is by default), it means that any post with a custom view file set (details in the docs) can include any file within /resources/views/custom_blog_posts, which blade will execute. This package gives no method to edit any file within that directory though.

Download package : https://github.com/WebDevEtc/BlogEtc

Comments

Sign in to publish a comment

0 comments

Be the first to comment on this post.