<?php

namespace Modules\Admin\app\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Modules\Admin\app\Http\Requests\CustomThemeRequest;
use Modules\Admin\app\Models\CustomTheme;
use Tymon\JWTAuth\Claims\Custom;

class CustomThemeController extends Controller
{
    public function index(CustomThemeRequest $request)
    {
        return response()->json([
            'data' => CustomTheme::first(),
            'status' => true
        ]);
    }

    public function updateOrCreate(CustomThemeRequest $request)
    {
        CustomTheme::updateOrCreate([
            'id' => 1
        ], $request->all());
        return response()->json([
            'data' => CustomTheme::first(),
            'status' => true
        ]);
    }
}
