Multi-tenant ile beraber kullandığım fortify auth da problem yaşıyorum. Route içi şu şekilde;
use App\Http\Controllers\DomainController;
use App\Http\Controllers\KullaniciProfilController;
use App\Http\Controllers\MintikalarController;
use Illuminate\Support\Facades\Route;
use Laravel\Fortify\Http\Controllers\AuthenticatedSessionController;
use Stancl\Tenancy\Middleware\InitializeTenancyByDomain;
use Stancl\Tenancy\Middleware\PreventAccessFromCentralDomains;
/*
|--------------------------------------------------------------------------
| Tenant Routes
|--------------------------------------------------------------------------
|
| Here you can register the tenant routes for your application.
| These routes are loaded by the TenantRouteServiceProvider.
|
| Feel free to customize them however you want. Good luck!
|
*/
Route::middleware([
'web',
InitializeTenancyByDomain::class,
PreventAccessFromCentralDomains::class,
])->group(function () {
//Ön sayfa - BAŞLANGIÇ
Route::get('/', function () {
return 'This is your multi-tenant application. The id of the current tenant is ' . tenant('id');
});
//Ön sayfa - BİTİŞ
//Yönetim Paneli - BAŞLANGIÇ
Route::prefix('yonetim')->group(function () {
Route::get('/', function () {
return view('back.anasayfa');
})->name('yonetim.anasayfa');
Route::get('/kullanici-profil', function () {
return view('back.kullanici-profil.index');
})->name('kullanici-profil');
Route::resource('domain', DomainController::class);
Route::resource('mintika', MintikalarController::class);
})->middleware('auth');
//Yönetim Paneli - BİTİŞ
});
Mesela domain.com/yonetim dediğimde Attempt to read property "name" on null
hatası veriyor. Normalde o sayfaya girmeye çalışınca login kısmına atması lazım. Nerede problem olabilir?