|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Created by PhpStorm. |
|
4
|
|
|
* User: Mark |
|
5
|
|
|
* Date: 05/03/2016 |
|
6
|
|
|
* Time: 20:30. |
|
7
|
|
|
*/ |
|
8
|
|
|
|
|
9
|
|
|
namespace App\Plugins\Newsletters; |
|
10
|
|
|
|
|
11
|
|
|
use App\Plugins\Newsletters\Model\NewsletterRepository; |
|
12
|
|
|
use App\Plugins\Newsletters\Model\NewsletterUser; |
|
13
|
|
|
use App\Plugins\PluginEngine; |
|
14
|
|
|
use Illuminate\Http\Request; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* Class BackendController. |
|
18
|
|
|
*/ |
|
19
|
|
|
class BackendController extends PluginEngine |
|
20
|
|
|
{ |
|
21
|
|
|
/** |
|
22
|
|
|
* Display a listing of the resource. |
|
23
|
|
|
* |
|
24
|
|
|
* @param NewsletterRepository $repository |
|
25
|
|
|
* @return \Illuminate\Contracts\View\View |
|
26
|
|
|
*/ |
|
27
|
|
|
public function index(NewsletterRepository $repository) |
|
28
|
|
|
{ |
|
29
|
|
|
return $this->make('index')->with('newsletters', $repository->all()); |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* Show the form for creating a new resource. |
|
34
|
|
|
* |
|
35
|
|
|
* @return \Illuminate\Http\Response |
|
|
|
|
|
|
36
|
|
|
*/ |
|
37
|
|
|
public function create() |
|
38
|
|
|
{ |
|
39
|
|
|
// |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* Store a newly created resource in storage. |
|
44
|
|
|
* |
|
45
|
|
|
* @param \Illuminate\Http\Request $request |
|
46
|
|
|
* @return \Illuminate\Http\Response |
|
|
|
|
|
|
47
|
|
|
*/ |
|
48
|
|
|
public function store(Request $request) |
|
|
|
|
|
|
49
|
|
|
{ |
|
50
|
|
|
// |
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* Display the specified resource. |
|
55
|
|
|
* |
|
56
|
|
|
* @param int $id |
|
57
|
|
|
* @return \Illuminate\Http\Response |
|
|
|
|
|
|
58
|
|
|
*/ |
|
59
|
|
|
public function show($id) |
|
|
|
|
|
|
60
|
|
|
{ |
|
61
|
|
|
// |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* Show the form for editing the specified resource. |
|
66
|
|
|
* |
|
67
|
|
|
* @param int $id |
|
68
|
|
|
* @return \Illuminate\Http\Response |
|
|
|
|
|
|
69
|
|
|
*/ |
|
70
|
|
|
public function edit($id) |
|
|
|
|
|
|
71
|
|
|
{ |
|
72
|
|
|
// |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* Update the specified resource in storage. |
|
77
|
|
|
* |
|
78
|
|
|
* @param \Illuminate\Http\Request $request |
|
79
|
|
|
* @param int $id |
|
80
|
|
|
* @return \Illuminate\Http\Response |
|
|
|
|
|
|
81
|
|
|
*/ |
|
82
|
|
|
public function update(Request $request, $id) |
|
|
|
|
|
|
83
|
|
|
{ |
|
84
|
|
|
// |
|
85
|
|
|
} |
|
86
|
|
|
|
|
87
|
|
|
/** |
|
88
|
|
|
* Remove the specified resource from storage. |
|
89
|
|
|
* |
|
90
|
|
|
* @param int $id |
|
91
|
|
|
* @return \Illuminate\Http\Response |
|
|
|
|
|
|
92
|
|
|
*/ |
|
93
|
|
|
public function destroy($id) |
|
|
|
|
|
|
94
|
|
|
{ |
|
95
|
|
|
// |
|
96
|
|
|
} |
|
97
|
|
|
} |
|
98
|
|
|
|
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.