git add .
git commit "fix: city selection, comment user display, and back button bug"
This commit is contained in:
@@ -3,11 +3,14 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\City;
|
||||
use App\Models\Province;
|
||||
|
||||
class CityController extends Controller
|
||||
{
|
||||
public function byProvince($province)
|
||||
public function byProvince( Province $province)
|
||||
{
|
||||
return City::where('province_id', $province)->get();
|
||||
return response()->json(
|
||||
$province->cities()->select('id', 'name')->get()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user