Code snippets

Folders should be normal "755" and files, "644"

sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache

Snippets

    // dates
    Carbon::parse($createdAt)->addSeconds($this->expires)->isPast(); // check if expired

    // token
    $token = app('auth.password.broker')->createToken($user); // create token manually


    // optional

    optional($user)->name

laravel #laravel5.4 @blog