mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
redirect if no locations
This commit is contained in:
@@ -65,6 +65,11 @@ class NodesController extends Controller
|
||||
|
||||
public function getNew(Request $request)
|
||||
{
|
||||
if (!Models\Location::all()->count()) {
|
||||
Alert::warning('You must add a location before you can add a new node.')->flash();
|
||||
return redirect()->route('admin.locations');
|
||||
}
|
||||
|
||||
return view('admin.nodes.new', [
|
||||
'locations' => Models\Location::all()
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user