Files
backend_vib360_laravel/app/Http/Controllers/LocationController.php

25 lines
496 B
PHP
Raw Normal View History

2025-04-08 15:12:48 +05:30
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Models\Country;
use App\Models\Models\State;
class LocationController extends Controller
{
public function getCountries()
{
2025-04-08 15:30:40 +05:30
$countries = Country::select('id', 'name','phonecode')->get();
2025-04-08 15:12:48 +05:30
return response()->json([
'data' => $countries
]);
}
// public function getState($id){
// $state = State::with('getCountryName')->select('id','name')
// }
}