<?php

use Illuminate\Support\Facades\Route;

foreach (config('tenancy.central_domains') as $domain) {
    Route::domain($domain)->group(function () {
        // your actual routes
        Route::get('/', function () {
            return view('welcome');
        });

        Auth::routes();
        Route::middleware(['auth'])->group(function () {
             Route::get('/admin', function () {
                        return view('admin');
                    })->name('admin');
                 // Route::get('/home', [App\Http\Controllers\CentralTenantController::class,'index'])->name('index');
                 Route::resource('/home', App\Http\Controllers\CentralTenantController::class);
                 Route::get('/home/{id}/backup', [App\Http\Controllers\CentralTenantController::class, 'backupTenant'])->name('backup');

     });



    });



}


// Auth::routes();

// Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');


// Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])
