404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.129.247.57: ~ $
<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Models\Reminder;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class RemindersController extends Controller
{
    public function setReminder(Request $request): JsonResponse
    {
        $reminder = Reminder::where('show_id', $request->show_id)->where('push_token', $request->token)->first();
        if (!$reminder) {
            $reminder = Reminder::create([
                'push_token' => $request->token,
                'days' => $request->days,
                'show_name' => $request->show_name,
                'start_time' => $request->start_time,
                'show_id' => $request->show_id,
            ]);
            return success_api_processor($reminder, 'Reminder set successfully!', 200);
        }
        return success_api_processor([], 'Reminder already set', 300);
    }

    public function deleteReminder(Request $request): JsonResponse
    {
        $reminder = Reminder::where('show_id', $request->show_id)->where('push_token', $request->token)->first();
        if ($reminder) {
            $reminder->delete();
            return success_api_processor([], 'Reminder deleted successfully!', 200);
        }
        return error_api_processor('Reminder not found!', 300, []);
    }
}

Filemanager

Name Type Size Permission Actions
MessagesController.php File 1.41 KB 0644
PushNotificationsController.php File 2.29 KB 0644
RemindersController.php File 1.29 KB 0644