when i try to store a value in session in a controller which make a connect to an API (ex:glosbe) session not saving any thing.
i don have problem with controllers that is not connect to an API.
i am using laravel 5.3
Your route service provider should include the route middleware. If it does, then the web middleware should not be applied to any routes that you have created. If it doesn't, then you need to apply the web middleware to your routes.
Are any errors thrown or is it just a blank page? instead of echoing the session, use dd(session('name')) and see what the results are.
Make sure of course, you're actually creating the session by visiting the URL that stores the session and then try view it on the home page.
thank @Jaytee for reply ; I don't have any problem with session for controllers that don't connect to any API . i have problem with session, just in a controller that connect to Glosbe API or oxford API or any other API ....
i checked my route service it was fine,
i try dd(session('name')) and return null
@Jaytee , if you have time, try to connect to an API(ex:oxford,Glosbe) and then save result in session and see do you have any problem or not.
The api.php file contains routes that the RouteServiceProvider places in the api middleware group, which provides rate limiting. These routes are intended to be stateless, so requests entering the application through these routes are intended to be authenticated via tokens and will not have access to session state.
thank @Snapey for answer me, so when oxford API or Glosbe API or any other API send data to my app. my app don't start session and i can't store anything in session.