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

Package requires a few changes to get working #10

Open
PaulMcML opened this issue Dec 20, 2023 · 4 comments
Open

Package requires a few changes to get working #10

PaulMcML opened this issue Dec 20, 2023 · 4 comments

Comments

@PaulMcML
Copy link

PaulMcML commented Dec 20, 2023

To get this package working I've had to do a fair amount of work

SendInviteNotification.php uses App\Mail\SendinviteMail - nowhere in the documentation does it state you need to create this.

Once mails are sent, the form itself will not work unless you add middleware to the panel, so in FilamentInviteServiceProvider.php you need to add the EncryptCookies and StartSession middleware


  use Illuminate\Cookie\Middleware\EncryptCookies;
  use Illuminate\Session\Middleware\StartSession;

    public function panel(Panel $panel): Panel
    {
        return $panel
            ->id('invite')
            ->path('invite')
            ->middleware([
                EncryptCookies::class,
                StartSession::class,
            ])            
            ->pages([
                Accept::class,
            ]);
    }

Once the password is set, Accept.php redirects to a hardcoded route of 'filament.admin.pages.dashboard' . Not everyone's panel will be called 'admin'. This needs to be configurable.

If I get chance I'll put together a pull request.

@mwagena
Copy link
Collaborator

mwagena commented Mar 12, 2024

hi @PaulMcML Thank you for submitting the issue, waiting for your Pull Request :)

@PaulMcML
Copy link
Author

I created the pull request in December last year

@mwagena
Copy link
Collaborator

mwagena commented Mar 13, 2024

My apologies, I noticed after my reply on this topic. I'll dive into it..

Interesting to see you needed to use the middleware, I didn't need to in my own project.

@mwagena
Copy link
Collaborator

mwagena commented Mar 18, 2024

hi @PaulMcML i have updated the develop branch, could you check if this works for you?
Please also check the readme.

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