Read cookies in Laravel Blade created in JS

Solution:

Also, you should keep in mind that by default Laravel can only read cookies set by Laravel.

The Laravel automatically encrypts all cookies with Bcrypt. You can do one of the following:

  1. Use Laravel backend to create your cookies. (Recommended)
  2. Encrypt your cookie value with Bcrypt in order to Laravel read them.
  3. Disable Laravel cookie encryption, which should allow your Laravel application to read cookies from all sources. (Not recommended)

Sources:

 Using Laravel to create cookies