Skip to content

hsadeghinejad/ArticleManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Stable Version Total Downloads Latest Unstable Version License

Article manager

This package use hsadeghinejad/AdminPanel to create a article management and blog view for laravel projects

Installation

  1. Add this service provider (It's for laravels before 5.5):
HamedSadeghi\ArticleManager\ArticleManagerServiceProvider::class
  1. Publish AdminPanel and ArticleManager assets:
php artisan vendor:publish --tag=AdminPanel-assets
php artisan vendor:publish --tag=ArticleManager-assets
  1. Migrate articles, categories and comments tables:
php artisan migrate

Using

Blog

Insert this code in your blog view page:

@include('articlemanager::blog')

Categories

Insert this code for categories view

@include('articlemanager::categories')

With this code access all of categories

$categories = ArticleManager::categories();

And usnig category.view route to get link of articles of a category:

<a href="{{ route('category.view', ['category' => $category->slug]) }}">$category->title</a>

Seeders

If you want use fake data to preview package, add this line in DatabaseSeeder:

\HamedSadeghi\ArticleManager\Database\Seeds\ArticlesTableSeeder::class