[Vuejs]-Check array 1 by 1 if the same then give a warning

0👍

Using cookies is a good way to achieve this.

Laravel provides functionalities, you can find it there: https://laravel.com/docs/5.6/requests#cookies

0👍

I think you can use both of the solutions,

but what is the difference between (local storage/cookie)?

local storage:: local storage stored data in client side only and you can’t inject to it some options such as expiry date.

cookie: cookie stored data to the server by each request, and you can add the expiry date to it.

if you want to save it in both of side (client/server),
we have a package for does it, it’s implemented by vue and nuxt , you can use it,

https://github.com/alibaba-aero/nuxt-universal-storage

Leave a comment