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

ebrahimirad's avatar

a session error after updating to laravel 5.4

Hi, After updating from laravel 5.3 to 5.4, I encountered with an error in vendor. The error is:

Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Session\Store::set() in /var/www/ostadbank.com/vendor/laravel/framework/src/Illuminate/Support/Manager.php:137

What can i do? please help

0 likes
3 replies
ebrahimirad's avatar
ebrahimirad
OP
Best Answer
Level 1

I solve it, for more information read this: https://laravel.com/docs/5.4/upgrade

All calls to the ->set() method should be changed to ->put(). Typically, Laravel applications would never call the set method since it has never been documented within the Laravel documentation. However, it is included here out of caution.

3 likes
NTGRAPH's avatar

Hi, can you be more specific ? My error is : fatal error exception in Manager.php line 137:call to undefined method Illuminate\session\store::set()

I go to manager.php line 137 and i see these line below:

public function __call($method, $parameters) { return $this->driver()->$method(...$parameters); }

I am not sure where to start to modify. Please help.

OpenHaus's avatar

@NTGRAPH Check if you are using app/Http/Middleware/Authenticate.php and search for

\Session::set('return', $request->path());

Change this to

\Session::put('return', $request->path());

Please or to participate in this conversation.