with([ "companies" => Company::all() ]); } public function createAdmin($id) { $company = Company::findOrFail($id); if($company->users->count()) { return redirect()->route("dashboard.companies.index"); } return view("dashboard.companies.create-admin")->with([ "company" => $company, "countries" => country()->all() ]); } }