Path : /var/www/clients/client0/web25/web/app/Http/Controllers/Back/ |
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
Current File : /var/www/clients/client0/web25/web/app/Http/Controllers/Back/TagController.php |
<?php namespace App\Http\Controllers\Back; use App\DataTables\TagsDataTable; use App\Http\Controllers\Controller; use App\Http\Requests\Back\TagRequest; use App\Models\Tag; use App\Repositories\TagRepository; class TagController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(TagsDataTable $dataTable) { return $dataTable->render('back.shared.index'); } /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { return view('back.tags.form'); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(TagRequest $request, TagRepository $repository){ $repository->store($request); return back()->with('ok', __('The tag has been successfully created')); } public function addTag(TagRequest $request, TagRepository $repository){ $result = $repository->store($request); return response()->json(''.$result); } /** * Display the specified resource. * * @param \App\Models\Tag $tag * @return \Illuminate\Http\Response */ public function show(Tag $tag) { // } /** * Show the form for editing the specified resource. * * @param \App\Models\Tag $tag * @return \Illuminate\Http\Response */ public function edit(Tag $tag) { return view('back.tags.form',compact('tag')); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\Tag $tag * @return \Illuminate\Http\Response */ public function update(TagRequest $request, Tag $tag,TagRepository $repository) { $repository->update($tag, $request); return back()->with('ok', __('The tag has been successfully updated')); } /** * Remove the specified resource from storage. * * @param \App\Models\Tag $tag * @return \Illuminate\Http\Response */ public function destroy(Tag $tag) { $tag->delete(); return response()->json(); } }