Skip to content

Commit cba37fd

Browse files
committed
♻️ clean up legacy
1 parent 0689281 commit cba37fd

File tree

9 files changed

+4
-1002
lines changed

9 files changed

+4
-1002
lines changed

app/Http/Controllers/Frontend/Admin/StationController.php

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,15 @@
77
use App\Http\Controllers\Controller;
88
use App\Http\Resources\StationResource;
99
use App\Models\Station;
10-
use App\Services\StationService;
1110
use App\Services\Wikidata\WikidataImportService;
1211
use Illuminate\Auth\Access\AuthorizationException;
1312
use Illuminate\Http\JsonResponse;
1413
use Illuminate\Http\RedirectResponse;
1514
use Illuminate\Http\Request;
1615
use Illuminate\Support\Facades\Log;
17-
use Illuminate\View\View;
1816

1917
class StationController extends Controller
2018
{
21-
public function index(Request $request): View|RedirectResponse
22-
{
23-
$this->authorize('viewAny', Station::class);
24-
$stations = Station::orderByDesc('created_at');
25-
if ($request->has('query')) {
26-
$query = strip_tags($request->get('query'));
27-
28-
if (is_numeric($query)) {
29-
$stations->where('id', $query);
30-
if ($stations->exists()) {
31-
return redirect()->route('admin.station', ['id' => $query]);
32-
}
33-
}
34-
35-
$stations->where('name', 'LIKE', '%' . $query . '%');
36-
37-
if ($stations->count() === 1) {
38-
return redirect()->route('admin.station', ['id' => $stations->first()->id]);
39-
}
40-
}
41-
42-
return view('admin.stations.index', [
43-
'stations' => $stations->paginate(20),
44-
]);
45-
}
46-
47-
public function show(int $id): View
48-
{
49-
$this->authorize('viewAny', Station::class);
50-
51-
$station = Station::findOrFail($id);
52-
53-
return view('admin.stations.show', [
54-
'station' => $station,
55-
'nearbyStations' => StationService::getNearbyStations($station),
56-
'latestCheckins' => StationService::getLatestCheckins($station),
57-
]);
58-
}
59-
6019
/**
6120
* !!!! Experimental Backend Function !!!!
6221
* Fetches the Wikidata information for a station.

app/Http/Controllers/Frontend/Admin/StatusEditController.php

Lines changed: 0 additions & 140 deletions
This file was deleted.

resources/tailwind-app/layouts/BackendLayout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
import { type FunctionalComponent } from 'vue';
1616
1717
const navLinks: { label: string; icon: FunctionalComponent; href: string }[] = [
18-
{ label: 'Trips', icon: Train, href: '/admin' },
18+
{ label: 'Trips', icon: Train, href: '/admin/trips' },
1919
{ label: 'Users', icon: Users, href: '/admin/users' },
2020
{ label: 'Events', icon: CalendarDays, href: '/admin/events' },
2121
{ label: 'Status', icon: Radio, href: '/admin/statuses' },

0 commit comments

Comments
 (0)