Blame view
app/Http/Controllers/Admin/MessageAreaController.php
2.09 KB
3575d19ae Админка новости и... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<?php namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use App\Models\ModelMailFeedback; use Illuminate\Http\Request; class MessageAreaController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { |
d82a28f22 Админка форматы и... |
18 19 |
$messages = ModelMailFeedback::query()->orderByDesc('created_at')->orderByDesc('id')->paginate(20); return view('admin.messages.index', compact('messages')); |
3575d19ae Админка новости и... |
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
} /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { // } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { // } /** * Display the specified resource. * |
d82a28f22 Админка форматы и... |
46 |
* @param \App\Models\ModelMailFeedback $message |
3575d19ae Админка новости и... |
47 48 |
* @return \Illuminate\Http\Response */ |
d82a28f22 Админка форматы и... |
49 |
public function show(ModelMailFeedback $message) |
3575d19ae Админка новости и... |
50 |
{ |
d82a28f22 Админка форматы и... |
51 |
return view('admin.messages.view', compact('message')); |
3575d19ae Админка новости и... |
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
} /** * Show the form for editing the specified resource. * * @param \App\Models\ModelMailFeedback $modelMailFeedback * @return \Illuminate\Http\Response */ public function edit(ModelMailFeedback $modelMailFeedback) { // } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\ModelMailFeedback $modelMailFeedback * @return \Illuminate\Http\Response */ public function update(Request $request, ModelMailFeedback $modelMailFeedback) { // } /** * Remove the specified resource from storage. * |
d82a28f22 Админка форматы и... |
80 |
* @param \App\Models\ModelMailFeedback $message |
3575d19ae Админка новости и... |
81 82 |
* @return \Illuminate\Http\Response */ |
d82a28f22 Админка форматы и... |
83 |
public function destroy(ModelMailFeedback $message) |
3575d19ae Админка новости и... |
84 |
{ |
d82a28f22 Админка форматы и... |
85 86 |
$message->delete(); return redirect()->route('admin.message.index'); |
3575d19ae Админка новости и... |
87 88 |
} } |