This package use hsadeghinejad/AdminPanel to create a article management and blog view for laravel projects
- Add this service provider (It's for laravels before 5.5):
HamedSadeghi\ArticleManager\ArticleManagerServiceProvider::class
- Publish
AdminPanel
andArticleManager
assets:
php artisan vendor:publish --tag=AdminPanel-assets
php artisan vendor:publish --tag=ArticleManager-assets
- Migrate
articles
,categories
andcomments
tables:
php artisan migrate
Insert this code in your blog view page:
@include('articlemanager::blog')
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>
If you want use fake data to preview package, add this line in DatabaseSeeder
:
\HamedSadeghi\ArticleManager\Database\Seeds\ArticlesTableSeeder::class