<?php

namespace App\Http\Controllers\Api\v1;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use App\Models\User;
use App\Http\Controllers\AppController;
use App\Models\ZapPage;
use App\Models\ZapPageFormButtons;
use App\Models\ZapPageFormFields;
use App\Http\Resources\ZapPage as ZapPageResource;


class CmsController extends AppController
{
    /**
     * @param Request $request
     * @return JsonResponse
     */
    public function get_zap_pages($slug){
        $zapPage = ZapPage::where('slug', $slug)->first();
        return new ZapPageResource($zapPage);
    }
}
