the browser-facing portion of osu!
at master 648 B view raw
1<?php 2 3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 4// See the LICENCE file in the repository root for full licence text. 5 6namespace App\Http\Controllers\Admin; 7 8use App\Models\UserContestEntry; 9 10class UserContestEntriesController extends Controller 11{ 12 public function destroy($id) 13 { 14 $entry = UserContestEntry::findOrFail($id); 15 $entry->delete(); 16 17 return response([], 204); 18 } 19 20 public function restore($id) 21 { 22 $entry = UserContestEntry::withTrashed()->findOrFail($id); 23 $entry->restore(); 24 25 return response([], 204); 26 } 27}