947d2425d9
git commit "fix: city selection, comment user display, and back button bug"
17 lines
301 B
PHP
17 lines
301 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\City;
|
|
use App\Models\Province;
|
|
|
|
class CityController extends Controller
|
|
{
|
|
public function byProvince( Province $province)
|
|
{
|
|
return response()->json(
|
|
$province->cities()->select('id', 'name')->get()
|
|
);
|
|
}
|
|
}
|