Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mcoil.corals.io/app/Http/Controllers/Front/Addresses/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mcoil.corals.io/app/Http/Controllers/Front/Addresses/StateCityController.php
<?php

namespace App\Http\Controllers\Front\Addresses;

use App\Http\Controllers\Controller;
use App\Shop\States\Repositories\StateRepository;
use App\Shop\States\Repositories\StateRepositoryInterface;

class StateCityController extends Controller
{
    private $stateRepo;

    /**
     * StateCityController constructor.
     *
     * @param StateRepositoryInterface $stateRepository
     */
    public function __construct(StateRepositoryInterface $stateRepository)
    {
        $this->stateRepo = $stateRepository;
    }

    /**
     * @param $state_code
     *
     * @return \Illuminate\Http\JsonResponse
     */
    public function index($state_code)
    {
        $state = $this->stateRepo->findOneBy(compact('state_code'));

        $stateRepo = new StateRepository($state);
        $data = $stateRepo->listCities();

        return response()->json(compact('data'));
    }
}

Spamworldpro Mini