Laravel-auditing: Cannot cache config

Created on 5 Jun 2017  路  2Comments  路  Source: owen-it/laravel-auditing

| Q | A
| ----------------- | ---
| Bug? | yes
| New Feature? | no
| Framework | Laravel
| Framework version | 5.4.24
| Package version | latest
| PHP version | 7.0.y

Actual Behaviour

I wanted to cache the config as usual but because of the closure

    /*
    |--------------------------------------------------------------------------
    | User Model & Resolver
    |--------------------------------------------------------------------------
    |
    | Define the User model class and how to resolve a logged User ID.
    |
    */
    'user' => [
        'model'    => App\User::class,
        'resolver' => function () {
            return Auth::check() ? Auth::user()->getAuthIdentifier() : null;
        },
    ],

it renders artisan and the laravel app unusable.

Expected Behaviour

No problems when using php artisan config:cache

Steps to Reproduce

Use php artisan config:cache

Possible Solutions

Remove the closure :P

duplicate

All 2 comments

Oh for fuck's sake, not this again. Mate, I've spent quite an amount of time properly documenting the package. Why would it be easier to create a new issue and wait for a reply, than doing a simple search, either in the GitHub issues or the troubleshooting section.

Sorry @quetzyg ^.^#

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mnlm picture mnlm  路  5Comments

JeffBeltran picture JeffBeltran  路  3Comments

AdamKyle picture AdamKyle  路  7Comments

tonvinh picture tonvinh  路  4Comments

romoka picture romoka  路  5Comments