main
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Site;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\City;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CityController extends Controller
|
||||
{
|
||||
public function stateList(){
|
||||
$city = City::whereNull('parent_id')->get();
|
||||
return response()->json($city);
|
||||
}
|
||||
public function cityList($state_id){
|
||||
$city = City::where('parent_id',$state_id)->get();
|
||||
return response()->json($city);
|
||||
}
|
||||
public function cityListAll(){
|
||||
$city = City::all();
|
||||
return response()->json($city);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user