arielcalcano

CEO at Caxiar Development

Hire Me

Experience

820

0 Best Reply Awards

  • Member Since 2 Years Ago
  • 6 Lessons Completed
  • 0 Favorites

1st September, 2016

arielcalcano left a reply on Use The Localisation Of Laravel For Carbon • 1 year ago

@saamretep Why not add this in the register method of your service provider?

This work for my Laravel package

on MyPackageServiceProvider.php:

    public function register()
    {
        setlocale(LC_TIME, config('app.locale'));
    }

Them in all my views just use:

$post->created_at->formatLocalized('%d de %B %Y')

Unfortunately the base class DateTime does not have any localization support. To begin localization support a formatLocalized($format) method was added.

18th May, 2016

1st September, 2015

arielcalcano left a reply on Laravel 5.1 CSRF-TOKEN • 2 years ago

After hours of research, I could fix the problem by simply adding the domain in: config/session.php

"Session Cookie Domain"

'domain' => 'your-app-domain'

It doesn't matter if the session driver is "database or other"

Greetings!

arielcalcano left a reply on [L5] Avoiding CSRF Middleware On API POST Routes • 2 years ago

After hours of research, I could fix the problem by simply adding the domain in: config/session.php

"Session Cookie Domain" 'domain' => 'your-app-domain'

It doesn't matter if the session driver is "database or other"

Greetings!

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.