Easily add a full Laravel blog (with built in admin panel and public views) to your laravel project with this simple package.

Overview

Webdevetc BlogEtc - Complete Laravel Blog Package

  • Quickly add a blog with admin panel to your existing Laravel project. It has everything included (routes, views, controllers, middleware, etc)
  • Works with latest version of Laravel.

Build Status StyleCI Latest Stable Version Total Downloads License Scrutinizer Code Quality Code Coverage

Recent changes (May/June 2020) including recent installation instructions:

  • This package no longer uses \App\User::canManageBlogEtcPosts() to check if a user can access the admin panel.
  • Instead it now uses a Laravel gate. This is currently backwards compatible without any edits.
  • For new installations please add the following to App\Providers\AuthServiceProvider:
   Gate::define(GateTypes::MANAGE_BLOG_ADMIN, static function (?Model $user) {
       // Implement your logic here, for example:
       return $user && $user->email === '[email protected]';
       // Or something like `$user->is_admin === true`
   });
  • The old way (using the canManageBlogEtcPosts() method on User.php) will still work but it is not recommended. At some point in the future it will be removed.

(Readme on webdevetc.com will be updated soon)

Blog Package for Laravel

This is WebDevEtc's BlogEtc Blog package for Laravel. It has everything you need to quickly and easily add a blog to your laravel app.

For installation instructions please read the Laravel blog install guide here

Install guidePackagist << They're simple, but must be followed.

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, 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/feature tests, run automatically on Travis CI.
  • 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 a gate to AuthServiceProvider (see note above)
    • but please see the install instructions to get everything up and working

How to customise the blog views/templates

This is easy to do, and further details can be found in our BlogEtc Laravel Blog Package Documentation.

After running the vendor:publish command, all of the default template files will be found in /resources/views/vendor/blogetc/ and are easy to edit to match your needs.

Missing /auth/register?

If you are installing on a fresh install of Laravel (which no longer includes auth built in) then the following must be ran:

composer require laravel/ui;
php artisan ui vue --auth;

Issues, support, bug reports, security issues

Please contact me on the contact from on WebDev Etc or on twitter and I'll get back to you ASAP.

Versions

  • 8.4 (Sept 2020): Added support for Laravel 8. Removed support for PHP 7.2
  • 8.3 (Sept 2020): Removed support for swisnl/laravel-fulltext as it seems abandoned.
    • Searching in blogetc is now much more simple - it is all inline in the controller and does a simple LIKE query.
    • If you need full text search then I recommend you implement your own search controller (see older commits to copy code that used full text search)
  • 8.2 (Sept 2020): Added fix for dynamic title
  • < 8.1 Support for PHP 7.2, 7.3, 7.4. Support for Lavavel 5.8.35 - 7.6
Comments
  • New Blog Package for Laravel6.x and higher

    New Blog Package for Laravel6.x and higher

    I made this package compatible with laravel6.x and higher. You can access it: packagist link Github: Github Link

    I noticed that the main developers refactors the code after version 3.1.4. So the current version on master is completely different from the latest version.

    opened by samberrry 14
  • Won't install on a fresh Laravel 5.8

    Won't install on a fresh Laravel 5.8


    composer require "webdevetc/blogetc" Using version ^3.1 for webdevetc/blogetc ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

    Problem 1 - Installation request for webdevetc/blogetc ^3.1 -> satisfiable by webdevetc/blogetc[v3.1]. - Conclusion: remove laravel/framework v5.8.11 - Conclusion: don't install laravel/framework v5.8.11 - webdevetc/blogetc v3.1 requires illuminate/database ~5.5.0|~5.6.0|~5.7.0 -> satisfiable by illuminate/database[5.5.x-dev, 5.6.x-dev, 5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9]. - don't install illuminate/database 5.5.x-dev|don't install laravel/framework v5.8.11 - don't install illuminate/database 5.6.x-dev|don't install laravel/framework v5.8.11 - don't install illuminate/database 5.7.17|don't install laravel/framework v5.8.11 - don't install illuminate/database 5.7.18|don't install laravel/framework v5.8.11 - don't install illuminate/database 5.7.19|don't install laravel/framework v5.8.11 - don't install illuminate/database 5.7.x-dev|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.0|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.16|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.17|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.2|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.28|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.33|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.34|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.35|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.36|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.37|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.39|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.40|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.41|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.43|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.5.44|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.0|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.1|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.10|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.11|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.12|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.13|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.14|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.15|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.16|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.17|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.19|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.2|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.20|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.21|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.22|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.23|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.24|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.25|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.26|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.27|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.28|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.29|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.3|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.30|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.31|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.32|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.33|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.34|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.35|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.36|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.37|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.38|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.39|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.4|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.5|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.6|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.7|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.8|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.6.9|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.0|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.1|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.10|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.11|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.15|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.2|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.20|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.21|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.22|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.23|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.26|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.27|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.28|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.3|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.4|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.5|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.6|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.7|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.8|don't install laravel/framework v5.8.11 - don't install illuminate/database v5.7.9|don't install laravel/framework v5.8.11 - Installation request for laravel/framework (locked at v5.8.11, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.11].

    Installation failed, reverting ./composer.json to its original content.

    Thanks, Raoul

    opened by raoulwegat 10
  • Recent Post to fix

    Recent Post to fix

    Hi @WebDevEtc

    in BlogEtc/src/Views/blogetc/sitewide/recent_posts.blade.php

    @forelse(\WebDevEtc\BlogEtc\Models\BlogEtcPost::orderBy("posted_at","desc")->limit(3)->get() as $post)

    you have to change it to

    @forelse(\WebDevEtc\BlogEtc\Models\BlogEtcPost::where('is_published', '=', 1)->where('posted_at', '<', Carbon\Carbon::now()->format('Y-m-d H:i:s'))->orderBy("posted_at","desc")->limit(3)->get() as $post)

    to only post the last one supposed to be posted =)

    opened by KaminoU 8
  • Youtube video embed

    Youtube video embed

    Can't embed youtube video in blog post correctly.

    Editor doesn't have video plugin installed: image

    When I use generated iframe from youtube and paste it into editor without image

    I get this: image

    When I paste it as code: image

    I get this: image

    But, when I go edit that post: image and image

    Is there other solution? Can I add video plugin somehow? Documentation is small. Also video is not responsive.

    opened by wast 7
  • Resolve User class using auth config array (Suggestion)

    Resolve User class using auth config array (Suggestion)

    In BlogEtcPost.php and BlogEtcComment.php, to make reference to User model configurable.

    Change code From return $this->belongsTo(User::class, 'user_id');

    To return $this->belongsTo(config('auth.providers.users.model', App\User::class), 'user_id');

    opened by Olabayo 6
  • Unexpected 'Gate' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)

    Unexpected 'Gate' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)

    Describe the bug syntax error, unexpected 'Gate' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)

    I copied this into my AuthServiceProvider

    Gate::define(\WebDevEtc\BlogEtc\Gates\GateTypes::MANAGE_BLOG_ADMIN, static function(?Model $admin){ // Implement your logic here, for example: return$user&&$user->email==='your-[email protected]'; // Or something like $user->is_admin === true });

    opened by t8ysn 5
  • Error

    Error "The config/blogetc.php does not exist"

    I followed all the steps in the "5 Minute Install Guide" from here:

    https://webdevetc.com/laravel/packages/blogetc-blog-system-for-your-laravel-app/help-documentation/laravel-blog-package-blogetc

    At the end I can see the /blog page but, when I try to get the /blog_admin page I get this error.

    Screen Shot 2019-09-16 at 9 03 46 PM

    As you can see the error says there is no blogetc.php into the config folder, but as this screenshot you can see there is a file into the folder.

    Screen Shot 2019-09-16 at 9 04 38 PM

    I have this screenshot also, where you can see I ran the command php artisan vendor:publish --provider="WebDevEtc\BlogEtc\BlogEtcServiceProvider"

    Screen Shot 2019-09-16 at 9 06 26 PM

    I think there is no clue, at least for me where could be the problem, I hope you can hit me up with some clue in order to fix it.

    Thanks!

    opened by FRKodes 5
  • fix bug when using custom User model

    fix bug when using custom User model

    When using a custom User model and logged in, author cannot view blogs using the public-facing url because the post author's belongsTo() relationship will be referencing the wrong User model.

    This PR fixes this bug

    opened by damms005 4
  • Unable to use the package using a non-default namespace

    Unable to use the package using a non-default namespace

    Hey.

    I'm unable to use the package with a namespace different from App.

    image

    A temporary fix is to modify it in the package every time you fetch a new version.

    opened by yoyosan 4
  • Query for .env file

    Query for .env file

    Hi Sir, I have cloned the project. When i'm trying to to install the composer i'm not getting .env file. I'm using composer install command how can i get the file please help?

    My Laravel version is 7.1 and PHP version 7.3.7

    email: [email protected]

    opened by 2015pgcaca44 3
  • Unpublished items are listing in search results

    Unpublished items are listing in search results

    Hi,

    I have set the 'is_published' field to false as default for the admin approval of posts. Here my issue is the search results page showing the unpublished posts in the listing.

    Please help me to resolve this issue.

    Thanks, ALLI

    opened by allyreflections 3
Releases(8.4.2)
A package to easily make use of Simple Icons in your Laravel Blade views.

Blade Simple Icons A package to easily make use of Simple Icons in your Laravel Blade views. For a full list of available icons see the SVG directory.

UB Labs 12 Jan 17, 2022
A package to easily make use of Iconic icons in your Laravel Blade views.

Blade Iconic A package to easily make use of Iconic icons in your Laravel Blade views. For a full list of available icons see the SVG directory. Iconi

Malik Alleyne-Jones 17 Aug 25, 2022
A package to easily make use of SVG icons in your Laravel Blade views.

Blade Icons A package to easily make use of SVG icons in your Laravel Blade views. Originally "Blade SVG" by Adam Wathan. Turn... <!-- camera.svg -->

Blade UI Kit 1.7k Jan 2, 2023
A package to easily make use of Iconsax in your Laravel Blade views.

Blade Iconsax A package to easily make use of Iconsax in your Laravel Blade views. This package contains 1.000 icons in 6 diferent styles, a total of

Guilherme Saade 4 Oct 22, 2022
Simple project to send bulk comma-separated emails using laravel and messenger module from quick admin panel generator.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Novath Thomas 1 Dec 1, 2021
An open source Laravel Soundboard with Admin Panel CRUD (Create Read Update Delete) built on Laravel, Bootstrap, and Vue.js

Laravel Soundboard An open source Laravel Soundboard with Admin Panel CRUD (Create Read Update Delete) built on Laravel 5.8, Bootstrap 4, Vue.js, Boot

Jeremy Kenedy 24 Oct 28, 2022
A Laravel Wrapper for the CoinDCX API. Now easily connect and consume the CoinDCX Public API in your Laravel apps without any hassle.

This package provides a Laravel Wrapper for the CoinDCX API and allows you to easily communicate with it. Important Note This package is in early deve

Moinuddin S. Khaja 2 Feb 16, 2022
Easily add all the 58 Algerian Wilayas and its Dairas to your cool Laravel project (Migrations, Seeders and Models).

Laravel-Algereography Laravel-Algereography allows you to add Migrations, Seeders and Models of Algerian Wilayas and Dairas to your existing or new co

Hocine Saad 48 Nov 25, 2022
Laravel 2-Step Verification is a package to add 2-Step user authentication to any Laravel project easily.

Laravel 2-Step verification is a package to add 2-Step user authentication to any Laravel project easily. It is configurable and customizable. It uses notifications to send the user an email with a 4-digit verification code. Laravel 2-Step Authentication Verification for Laravel. Can be used in out the box with Laravel's authentication scaffolding or integrated into other projects.

Jeremy Kenedy 204 Dec 23, 2022
A Laravel Admin Starter project with Page Builder, Roles, Impersonation, Analytics, Blog, News, Banners, FAQ, Testimonials and more

Laravel CMS Starter Project A Laravel CMS Starter project with AdminLTE theme and core features. Preview project here User: [email protected]

Ben-Piet O'Callaghan 306 Nov 28, 2022
Cagilo - a set of simple components for use in your views Laravel Blade.

Cagilo - a set of simple components for use in your views Laravel Blade. Official Documentation Documentation for Cagilo can be found on its we

Cagilo 151 Dec 6, 2022
A simple job posting application using PHP with an Admin Panel. Register, Login and create the job in apnel. The job gets posted on index page.

Jobee A simple job posting application using PHP with an Admin Panel. Register, Login and create the job in apnel. The job gets posted on index page.

Fahad Makhdoomi 2 Aug 27, 2022
🧑‍🔬 The missing assertions for your views in your Laravel applications.

Laravel View Assertions The missing assertions for your views in your Laravel applications. Installation You'll have to follow a couple of simple step

Sven Luijten 4 Dec 21, 2022
A mostly useless package to display framework versions at the bottom of the Admin navigation panel.

A mostly useless package to display framework versions at the bottom of the Filament Admin navigation panel and an optional widget to do the same in the dashboard or custom pages.

Adam Weston 10 Nov 8, 2022
A blog website with blog details with laravel

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

PreshDev 3 Mar 6, 2022
Projeto de um blog chamado Blog Codar feito durante o curso PHP: Do zero a maestria, ministrado pelo Matheus Baptisti

PJ- Blog Codar Este projeto é um blog fictício. Apesar de poder ser usado como um blog real, este projeto não tem conexão com banco de dados, então es

João Pedro Sassi Granado 4 Nov 5, 2021
A simple blog app where a user can signup , login, like a post , delete a post , edit a post. The app is built using laravel , tailwind css and postgres

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Nahom_zd 1 Mar 6, 2022
A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.

Install Install via composer. $ composer require olliecodes/laravel-etched-blade Once installed you'll want to publish the config. $ php artisan vendo

Ollie Codes 19 Jul 5, 2021
Public API for the project coding.events. Made in PHP 8.0 with Lumen 8, PHP-FPM, NGINX and MySQL 8.

coding.events API Uma API feita apenas para passar o tempo, montando uma API para o site <coding.events>. Sinta-se livre para usar esse código como es

Kaique Garcia 3 Oct 9, 2022