Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Suggestion : Add auth_session variable in default config file #1452

Closed
wants to merge 1 commit into from
Closed

[5.x] Suggestion : Add auth_session variable in default config file #1452

wants to merge 1 commit into from

Conversation

mho22
Copy link

@mho22 mho22 commented Mar 15, 2024

During the update to Laravel 11, I encountered a difficult-to-understand issue: Target class [] does not exist.

Beforehand, I had cleaned up my configuration files to align with the new, cleaner Laravel 11 structure. The only different element remaining in my configuration file was the features array [ in the config stub file ].

It appears that the Target class [] does not exist issue stemmed from the absence of the jetstream.auth_session variable, which is typically found in web.php:

 Route::middleware([
    'auth:sanctum',
    config('jetstream.auth_session'),
    'verified',
])->group(function () {
    Route::get('/dashboard', function () {
        return Inertia::render('Dashboard');
    })->name('dashboard');
});

Adding this variable to my configuration file resolved the issue. I wondered if it might be a good idea to include it by default in the vendor/laravel/jetstream/config/jetstream.php file.

@driesvints driesvints changed the title Suggestion : Add auth_session variable in default config file [5.x] Suggestion : Add auth_session variable in default config file Mar 15, 2024
@mho22 mho22 deleted the add-auth-session-in-config-patch branch March 15, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants