Skip to content

Commit e4e63b4

Browse files
committed
theme index done
1 parent 7c3edfe commit e4e63b4

29 files changed

Lines changed: 4413 additions & 4338 deletions

app/Http/Controllers/ThemesController.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ public function index()
2525
]);
2626
}
2727

28+
public function apiIndex()
29+
{
30+
$query = Theme::query();
31+
32+
if ($search = request('search')) {
33+
$query->where(fn ($q) => $q
34+
->where('name', 'like', "%{$search}%")
35+
->orWhere('title', 'like', "%{$search}%")
36+
->orWhere('description', 'like', "%{$search}%")
37+
);
38+
}
39+
40+
return $query->paginate(50)->withQueryString();
41+
}
42+
2843
public function show(string $name)
2944
{
3045
return response()->json(
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/assets/app-DQdOO5ak.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/assets/app-Dxs_Y4tC.css

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

public/build/assets/appearance-D_6zIsJ7.js renamed to public/build/assets/appearance-DmTjnABn.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)