Laravel-Backpack / CRUD

Build custom admin panels. Fast!
https://backpackforlaravel.com
MIT License
3k stars 880 forks source link

update getting started #5525

Closed pxpm closed 1 month ago

pxpm commented 1 month ago

WHY

BEFORE - What was wrong? What was happening before this PR?

Reported in #5429 the instructions would double hash the password for installations that came with the password already casted in the model, like by default Laravel 11:

/**
     * Get the attributes that should be cast.
     *
     * @return array<string, string>
     */
    protected function casts(): array
    {
        return [
            'email_verified_at' => 'datetime',
            'password' => 'hashed',
        ];
    }

AFTER - What is happening after this PR?

I updated the docs to be clear when developers should or not cast the password with the model events.