| @@ 20-28 (lines=9) @@ | ||
| 17 | * |
|
| 18 | * @return \Illuminate\View\View |
|
| 19 | */ |
|
| 20 | public function index(): View |
|
| 21 | { |
|
| 22 | $articles = Article::with('category', 'user') |
|
| 23 | ->paginate(config('xetaravel.pagination.blog.article_per_page')); |
|
| 24 | ||
| 25 | $this->breadcrumbs->addCrumb('Manage Articles', route('admin.blog.article.index')); |
|
| 26 | ||
| 27 | return view('Admin::Blog.article.index', ['articles' => $articles, 'breadcrumbs' => $this->breadcrumbs]); |
|
| 28 | } |
|
| 29 | ||
| 30 | /** |
|
| 31 | * Show the article create form. |
|
| @@ 35-44 (lines=10) @@ | ||
| 32 | * |
|
| 33 | * @return \Illuminate\View\View |
|
| 34 | */ |
|
| 35 | public function showCreateForm(): View |
|
| 36 | { |
|
| 37 | $categories = Category::pluck('title', 'id'); |
|
| 38 | ||
| 39 | $breadcrumbs = $this->breadcrumbs |
|
| 40 | ->addCrumb('Manage Articles', route('admin.blog.article.index')) |
|
| 41 | ->addCrumb("Create", route('admin.blog.article.create')); |
|
| 42 | ||
| 43 | return view('Admin::Blog.article.create', ['categories' => $categories, 'breadcrumbs' => $this->breadcrumbs]); |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * Handle an article create request for the application. |
|
| @@ 19-26 (lines=8) @@ | ||
| 16 | * |
|
| 17 | * @return \Illuminate\View\View |
|
| 18 | */ |
|
| 19 | public function index(): View |
|
| 20 | { |
|
| 21 | $categories = Category::paginate(config('xetaravel.pagination.blog.article_per_page')); |
|
| 22 | ||
| 23 | $this->breadcrumbs->addCrumb('Manage Categories', route('admin.blog.category.index')); |
|
| 24 | ||
| 25 | return view('Admin::Blog.category.index', ['categories' => $categories, 'breadcrumbs' => $this->breadcrumbs]); |
|
| 26 | } |
|
| 27 | ||
| 28 | /** |
|
| 29 | * Show the caterory create form. |
|