Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

chrisgrim's avatar

Question about session working intermittently

I have a method

public function thanks(Event $event)
    {
        return redirect('create-event/edit')->with('message', 'submitted');
    }

In my blade I have

@if(Session::has('message'))
    <div id="flash">
        <vue-alert message="{{ Session::get('message') }}"></vue-alert>
    </div>
@endif

This pops up my alert every time on my local machine. On my server it only seems to popup the alert randomly. Has anyone else had this issue? Is there a way to see if the message session is being sent inside google console tools?

0 likes
2 replies
humphreypantaleo's avatar

don't use session in blade for checking the message, check the messsage in the vue component

chrisgrim's avatar

I thought Vue couldnt read laravel session data?

Please or to participate in this conversation.