2017 © Pedro Peláez
 

laravel-module blog-module

A blog module for cms.

image

ast/blog-module

A blog module for cms.

  • Friday, April 27, 2018
  • by lilili001
  • Repository
  • 1 Watchers
  • 0 Stars
  • 19 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Blog module

Latest Version Software License Build Status Quality Score SensioLabs Insight Total Downloads Slack, (*1)

Installation

Module Download

Using AsgardCMS's module download command:, (*2)

bash php artisan asgard:download:module asgardcms/blog --migrations, (*3)

This will download the module and run its migrations ., (*4)

This is the recommended way if you wish to customise the fields, views, etc., (*5)

Composer

Execute the following command in your terminal, (*6)

composer require asgardcms/blog-module

This is if the contact module is perfect for your use-case as-is, and doesn't need any changes to fit your needs., (*7)

Note: After installation you'll have to give you the required permissions to get to the blog module pages in the backend., (*8)

Usage

  • You have to create a blog.index and blog.show page in your front end theme.
  • You can link to the blog index page using : route(locale() . '.blog')
  • In the blog index you'll have access to a $posts variable on which you can loop
  • To create a link to a specific post: route(locale() . '.blog.slug', [$post->slug])
  • On the blog index and blog show pages you'll have access to a $latestPosts variable containing the latest posts, this amount can be configured in the admin.
  • On a post detail page, you can have access to the next and previous post by calling:
    • $post->present()->previous
    • $post->present()->next

Resources

Info

All AsgardCMS modules respect Semantic Versioning., (*9)

The Versions