fix: promotion
This commit is contained in:
@@ -27,6 +27,19 @@ public function index()
|
||||
return response()->json($promotions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Admin listing: returns ALL promotions regardless of is_active or the
|
||||
* start/end window, so admins can see and edit inactive/expired ones.
|
||||
*/
|
||||
public function adminIndex()
|
||||
{
|
||||
$promotions = Promotion::orderBy('priority', 'desc')
|
||||
->orderByDesc('id')
|
||||
->get();
|
||||
|
||||
return response()->json($promotions);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$data = $request->validate([
|
||||
|
||||
Reference in New Issue
Block a user