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

Suggestion : customize the path for Profile or Teams Inertia pages #1491

Closed
mho22 opened this issue May 13, 2024 · 1 comment
Closed

Suggestion : customize the path for Profile or Teams Inertia pages #1491

mho22 opened this issue May 13, 2024 · 1 comment

Comments

@mho22
Copy link

mho22 commented May 13, 2024

In my use case, I had moved the Profile directory in a Application directory to separate these from a Dashboard directory.

As Jetstream hardcoded Profile/Show within its UserProfileController@show I understood I couldn't and dived into the documentation to find out two things :

  1. Customizing Jetstream's Page Rendering
    Jetstream::inertia()->render(
        'Profile/Show',
        function (Request $request, array $data) {
            return array_merge($data, [
                // Custom data...
            ]);
        }
    );

This won't help modifying the page path of course, but next, we have this :

  1. Customizing the Authentication Views
Fortify::loginView(function () {
    return Inertia::render('Auth/Login', [
        'canResetPassword' => Route::has('password.request'),
        'status' => session('status'),
    ]);
});

Indeed related to Fortify.

Should it be possible AND interesting to suggest a PR giving the Jetstream::profileView() or Jetstream::teamsView() and other next static methods and enabling the customization of Jetstream views in the Fortify way ?

Sorry if I maybe missed something.

@driesvints
Copy link
Member

Hi @mho22 I don't think we'll be modifying much here atm. You can always attempt a PR if you like to see if Taylor would accept it.

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

No branches or pull requests

2 participants