<?php

namespace App\Controllers\Front;

use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;

class Home extends FrontController
{
    public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
    {
        parent::initController($request, $response, $logger);
    }

    public function getFields(string $action): array
    {
        return [];
    }
    public function getFieldFilters(): array
    {
        return [];
    }

    //Index 관련
    public function index()
    {
        helper('form');
        //$this->_viewDatas['parts'] = Product['parts'];
        // dd($this->_viewDatas);
        $this->_session->setFlashdata(SESSION_NAMES['RETURN_URL'], current_url() . '?' . $this->request->getUri()->getQuery() ?: "");
        return view($this->_viewPath . 'welcome_message', ['viewDatas' => $this->_viewDatas]);
    }
}
