So you can use the model as a facade and write a similar query. I'm assuming you want an exception thrown when there is no region with that slug?
https://laravel.com/docs/8.x/eloquent#not-found-exceptions
public function show($slug)
{
$regions = Region::where('slug', $slug)->firstOrFail();
$regions_list = Region::all();
return view('tournaments.show', [
'regions' => $regions,
'regions_list' => $regions_list,
]);
}
You may want to handle the ModelNotFoundException
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…