Update (all): fix php formatting using laravel pint, fix blade using shufo

This commit is contained in:
2023-07-25 22:18:01 +08:00
parent 6adc27076d
commit 82353c1ecd
37 changed files with 536 additions and 480 deletions

View File

@@ -3,32 +3,27 @@
namespace App\Http\Controllers\Front;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Stevebauman\Location\Facades\Location;
use App\Models\Category;
use App\Models\CountryLocale;
use Illuminate\Http\Request;
class HomeController extends Controller
{
public function index(Request $request)
{
return redirect()->route('home.country', ['country' => 'my']);
return redirect()->route('home.country', ['country' => 'my']);
}
public function country(Request $request, $country)
{
$country = CountryLocale::where('slug', $country)->first();
$country = CountryLocale::where('slug', $country)->first();
if (!is_null($country))
{
$categories = Category::where('country_locale_id', $country->id)->get();
if (! is_null($country)) {
$categories = Category::where('country_locale_id', $country->id)->get();
return view('front.country', ['categories' => $categories, 'country' => $country]);
}
return view('front.country', ['categories' => $categories, 'country' => $country]);
}
return redirect()->route('home.country', ['country' => 'my']);
return redirect()->route('home.country', ['country' => 'my']);
}
}