📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-07-02 05:07:06
📂
/ (Root)
/
home
/
orkouolp
/
web
/
testing.orkobd
/
laravel
/
app
/
Http
/
Controllers
/
Frontend
📍 /home/orkouolp/web/testing.orkobd/laravel/app/Http/Controllers/Frontend
🔄 Refresh
✏️
Editing: LocationController.php
Writable
<?php namespace App\Http\Controllers\Frontend; use App\Http\Controllers\Controller; use App\Models\State; use App\Models\City; use Illuminate\Http\Request; class LocationController extends Controller { /** get all the states of a country by id * @param $countryId */ function getStates(string $countryId) { $states = State::select('id', 'name', 'country_id') ->where('country_id', $countryId)->get(); return response($states); } /** get all the cities of a state by id * @param $stateId */ function getCities(string $stateId) { $cities = City::select('id', 'name', 'state_id', 'country_id') ->where('state_id', $stateId)->get(); return response($cities); } }
💾 Save Changes
❌ Cancel