|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace App\Http\Controllers; |
| 4 | + |
| 5 | +use App\Comment; |
| 6 | +use App\User; |
| 7 | +use Illuminate\Http\Request; |
| 8 | + |
| 9 | +class CommentController extends Controller |
| 10 | +{ |
| 11 | + /** |
| 12 | + * Display a listing of the resource. |
| 13 | + * |
| 14 | + * @return \Illuminate\Http\Response |
| 15 | + */ |
| 16 | + public function index() |
| 17 | + { |
| 18 | + // |
| 19 | + } |
| 20 | + |
| 21 | + /** |
| 22 | + * Show the form for creating a new resource. |
| 23 | + * |
| 24 | + * @return \Illuminate\Http\Response |
| 25 | + */ |
| 26 | + public function create() |
| 27 | + { |
| 28 | + // |
| 29 | + } |
| 30 | + |
| 31 | + /** |
| 32 | + * Store a newly created resource in storage. |
| 33 | + * |
| 34 | + * @param \Illuminate\Http\Request $request |
| 35 | + * @return \Illuminate\Http\Response |
| 36 | + */ |
| 37 | + public function store(Request $request) |
| 38 | + { |
| 39 | + $comment = new Comment(); |
| 40 | + $comment->comment = $request->comment; |
| 41 | + $comment->percent = $request->percent; |
| 42 | + $comment->user_id = auth()->user()->id; |
| 43 | + $comment->save(); |
| 44 | + return redirect()->back(); |
| 45 | + } |
| 46 | + /** |
| 47 | + * Display the specified resource. |
| 48 | + * |
| 49 | + * @param \App\Comment $comment |
| 50 | + * @return \Illuminate\Http\Response |
| 51 | + */ |
| 52 | + public function show(Comment $comment) |
| 53 | + { |
| 54 | + // |
| 55 | + } |
| 56 | + |
| 57 | + /** |
| 58 | + * Show the form for editing the specified resource. |
| 59 | + * |
| 60 | + * @param \App\Comment $comment |
| 61 | + * @return \Illuminate\Http\Response |
| 62 | + */ |
| 63 | + public function edit(Comment $comment) |
| 64 | + { |
| 65 | + // |
| 66 | + } |
| 67 | + |
| 68 | + /** |
| 69 | + * Update the specified resource in storage. |
| 70 | + * |
| 71 | + * @param \Illuminate\Http\Request $request |
| 72 | + * @param \App\Comment $comment |
| 73 | + * @return \Illuminate\Http\Response |
| 74 | + */ |
| 75 | + public function update(Request $request, Comment $comment) |
| 76 | + { |
| 77 | + // |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * Remove the specified resource from storage. |
| 82 | + * |
| 83 | + * @param \App\Comment $comment |
| 84 | + * @return \Illuminate\Http\Response |
| 85 | + */ |
| 86 | + public function destroy(Comment $comment) |
| 87 | + { |
| 88 | + // |
| 89 | + } |
| 90 | +} |
0 commit comments