0 Best Reply Awards

  • Member Since 4 Months Ago
  • 6 Lessons Completed
  • 0 Favorites

26th September, 2018

Neewd started a new conversation Installation Error When Migrating • 2 weeks ago

I just got Spark, and after I tried to migrate the tables, I got the following error :

Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table announcements add primary key announcements_id_primary(id))

In the older version of Laravel I was used to correct that by adding a line in the boot() of the AppServiceProvider.


But the line was already there so I don't know where the problem. I didn't touch to any file so ...

If anyone had this issue I'll be glad to hear the solution !


25th September, 2018

Neewd left a reply on Laravel + Vue : How To Verify The User Is Connected • 3 weeks ago

Let me clarify the situation. or at least try to.

So, when my parent component is mounted, I would like to store via Vuex the fact that a user is connected or not, to hide the "Sign in" "Signup" buttons and display a default avatar.

Till then I was making a request to the back to retrieve the Auth::user() but it seems to be the bad way to do this, and I notice two tokens are created when I log my user. "Laravel_token" when it's a normal connection, with a "remember_token" when the user wants to be remembered at the browser closing.

So I wanted to check those cookies.

It's the first website I am fully coding so I try to do my best to assimilate every process the best way I can.

Thanks a lot again !

24th September, 2018

Neewd left a reply on Laravel + Vue : How To Verify The User Is Connected • 3 weeks ago

Oh ok, it's a lot more clearer to me ! I have on more question, I was thinking the httpOnly true / false of the laravel_token was on the Session.php file, but I switch it, but even with a cache clear, the laravel_token is still unavailable to Javascript because the flag is still on :/

Neewd left a reply on Laravel + Vue : How To Verify The User Is Connected • 3 weeks ago

OK so if it’s only an header to ado to almost each request (if i listen you) ! It’s basically an encrypted key or something else ?

Neewd left a reply on Laravel + Vue : How To Verify The User Is Connected • 3 weeks ago

I am not quite a security expert so I don’t Know where to look. Does the Laravel documentation talk about those stuff ?

Neewd left a reply on Laravel + Vue : How To Verify The User Is Connected • 3 weeks ago

It’s a security against XSS attack so we should let him on no ?

Neewd started a new conversation Laravel + Vue : How To Verify The User Is Connected • 3 weeks ago


I have quite newbie question around here. When I log my user, Laravel store a "laravel_token" and if we want also a "remember" token in the cookies.

So when the user close the page, or the browser, how could we check the cookies, to see if the connection is still available ? Because the cookies are created with the httpOnly flag, so they're disabled for javascript checking ...

Thanks for your answers, and sorry once more for that stupid question :(


15th August, 2018

Neewd started a new conversation Do We Must Use A Paid Mailing Service ? • 2 months ago


I am currently implementing some features who needs to mail the user.

From the docs I have seen a lot about mailgun, sparkpost, mantrill and some other.

But nobody talked about own implementation ? It’s impossible to implement our own mail function nowadays ?

I know those services can track my needs etc etc but atm I do not matter or such feature and their free pricing plans seems quite low for my mid term needs.

If anyone got that question I would be happy to listen the answers


23rd June, 2018

Neewd started a new conversation Redirect With Messages On Session Don't Work • 3 months ago


For the context, I have a route who activate the account when the user clicks on a button on his email. At the end of my controller I would like to redirect into my '/' route with a little session flash message to indicate at the user that his account has been activated.

I took the documentation from Laravel with this little piece of code :

return redirect('dashboard')->with('status', 'Profile updated!');

I adapt this example to my needs like this :

return redirect('/')->with('message', 'You're account has been activated!');

The only part who changed in comparison of the documentation example is that I use Vue components as front-end so when my component mount, I check if the session exists, but it always returns me false :(

Does anyone have this kind of example with Vue who actually works ?

Thank you for your kind help and your time,

15th June, 2018

Neewd left a reply on Laravel + Vue : Routes On Web.php / Api.php • 4 months ago

If I want to use the CreateFreshApiToken, it comes from Passport, how I can use this without Passport ? :o

I have another question about the consumption of my API through my javascript framework. I put my API routes in my 'api.php', and my web routes - and Auth::routes in my web.php. The CreateFreshApiToken middleware will be add to the web groups middleware, so when I'll make a login, the reply will contains a token, and when I will make an axios call to my API, I have to send the X-CSRF-TOKEN and the width in the headers, and all gonna be right, right ?

Neewd left a reply on Laravel + Vue : Routes On Web.php / Api.php • 4 months ago


Thanks you both for your answers. My need is to call my API in the front-end via Vue.js, if I put my ::resource routes on the api.php, and if I use the CreateFreshApiToken for my API auth, that fills my need no ?

14th June, 2018

Neewd started a new conversation Laravel + Vue : Routes On Web.php / Api.php • 4 months ago

Hello guys,

I am quite a new guy on Laravel and I have started working on a project, and I would like get some advice about the good architecture to pick.

I decided to manage my front with Vue and my backend with Laravel.

What I have started to do is to capture the routes through Laravel and sent it to my Vue routes to determines which components to load etc. And I was thinking to make "api" calls though axios into my Vue.components to retrieve the data from my controller in order to display them into my view.

That's still a "web" logic.

But I am also thinking to the future API I will provide.

So what is the best option to take ?

Put some Route::resource('model', 'Controller') into the web.php file, then call those routes in my Vue.components, and put the Route::resource('model','Controller') into my api.php file ?

Thank you for your answer I don't know if I am going the right way or not.


Edit Your Profile

Want to change your profile photo? We pull from