1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace App\Http\Controllers; |
4
|
|
|
|
5
|
|
|
use App\Models\CalendarEvent; |
6
|
|
|
use Illuminate\Http\Request; |
7
|
|
|
|
8
|
|
|
class CalendarEventController extends Controller |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* Display a listing of the resource. |
12
|
|
|
* |
13
|
|
|
* @return \Illuminate\Http\Response |
14
|
|
|
*/ |
15
|
|
|
public function index(Request $request) |
|
|
|
|
16
|
|
|
{ |
17
|
|
|
$calender_event = CalendarEvent::get(); |
18
|
|
|
|
19
|
|
|
return $calender_event; |
20
|
|
|
} |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Show the form for creating a new resource. |
24
|
|
|
* |
25
|
|
|
* @return \Illuminate\Http\Response |
26
|
|
|
*/ |
27
|
|
|
public function create() |
28
|
|
|
{ |
29
|
|
|
// |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Store a newly created resource in storage. |
34
|
|
|
* |
35
|
|
|
* @param \Illuminate\Http\Request $request |
36
|
|
|
* @return \Illuminate\Http\Response |
37
|
|
|
*/ |
38
|
|
|
public function store(Request $request) |
39
|
|
|
{ |
40
|
|
|
return CalendarEvent::create([ |
|
|
|
|
41
|
|
|
'title' => $request->name, |
42
|
|
|
]); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Display the specified resource. |
47
|
|
|
* |
48
|
|
|
* @param int $id |
49
|
|
|
* @return \Illuminate\Http\Response |
50
|
|
|
*/ |
51
|
|
|
public function show($id) |
|
|
|
|
52
|
|
|
{ |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Show the form for editing the specified resource. |
57
|
|
|
* |
58
|
|
|
* @param int $id |
59
|
|
|
* @return \Illuminate\Http\Response |
60
|
|
|
*/ |
61
|
|
|
public function edit($id) |
|
|
|
|
62
|
|
|
{ |
63
|
|
|
// |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* Update the specified resource in storage. |
68
|
|
|
* |
69
|
|
|
* @param \Illuminate\Http\Request $request |
70
|
|
|
* @param int $id |
71
|
|
|
* @return \Illuminate\Http\Response |
72
|
|
|
*/ |
73
|
|
|
public function update(Request $request, $id) |
|
|
|
|
74
|
|
|
{ |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* Remove the specified resource from storage. |
79
|
|
|
* |
80
|
|
|
* @param int $id |
81
|
|
|
* @return \Illuminate\Http\Response |
82
|
|
|
*/ |
83
|
|
|
public function destroy($id) |
|
|
|
|
84
|
|
|
{ |
85
|
|
|
} |
86
|
|
|
} |
87
|
|
|
|
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.