1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Chriscreates\Blog\Controllers; |
4
|
|
|
|
5
|
|
|
use Chriscreates\Blog\Category; |
6
|
|
|
use Illuminate\Http\Request; |
7
|
|
|
|
8
|
|
|
class CategoryController extends Controller |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* Instantiate a new controller instance. |
12
|
|
|
* |
13
|
|
|
* @return void |
|
|
|
|
14
|
|
|
*/ |
15
|
|
|
public function __construct() |
16
|
|
|
{ |
17
|
|
|
$this->middleware('auth'); |
18
|
|
|
} |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Display a listing of the resource. |
22
|
|
|
* |
23
|
|
|
* @return \Illuminate\Http\Response |
24
|
|
|
*/ |
25
|
|
|
public function index() : JsonResponse |
26
|
|
|
{ |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Store a newly created resource in storage. |
31
|
|
|
* |
32
|
|
|
* @param \Chriscreates\Blog\Requests\ValidateCategoryRequest $request |
33
|
|
|
* @return \Illuminate\Http\Response |
34
|
|
|
*/ |
35
|
|
|
public function store(ValidateCategoryRequest $request) : JsonResponse |
|
|
|
|
36
|
|
|
{ |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* Show the form for editing the specified resource. |
41
|
|
|
* |
42
|
|
|
* @param \Chriscreates\Blog\Category $category |
43
|
|
|
* @return \Illuminate\Http\Response |
44
|
|
|
*/ |
45
|
|
|
public function edit(Category $category) : JsonResponse |
|
|
|
|
46
|
|
|
{ |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* Update the specified resource in storage. |
51
|
|
|
* |
52
|
|
|
* @param \Chriscreates\Blog\Requests\ValidateCategoryRequest $request |
53
|
|
|
* @param \Chriscreates\Blog\Category $category |
54
|
|
|
* @return \Illuminate\Http\Response |
55
|
|
|
*/ |
56
|
|
|
public function update(ValidateCategoryRequest $request, Category $category) : JsonResponse |
|
|
|
|
57
|
|
|
{ |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Remove the specified resource from storage. |
62
|
|
|
* |
63
|
|
|
* @param \Chriscreates\Blog\Category $category |
64
|
|
|
* @return \Illuminate\Http\Response |
65
|
|
|
*/ |
66
|
|
|
public function destroy(Category $category) : JsonResponse |
|
|
|
|
67
|
|
|
{ |
68
|
|
|
} |
69
|
|
|
} |
70
|
|
|
|
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.