token generation works, tinker call works, but directly afterwards rollback. Change order of artisan calls in install to pinpoint cause of roll back

This commit is contained in:
Boudewijn 2025-03-03 15:32:58 +01:00
parent a718380bfd
commit 934dfddcb3

View file

@ -102,12 +102,11 @@ pushd "$install_dir"
"php$php_version" artisan key:generate -n --force --env
"php$php_version" artisan make:database $app
"php$php_version" artisan migrate:fresh --seed -n --force
"php$php_version" artisan config:clear -n
"php$php_version" artisan config:cache -n
#"php$php_version" artisan app:create-user "$user" "$email" "$password"
# Alternative method: direct injection of credentials using Artisan Tinker:
echo "use App\Models\User; User::create(['name' => '$user', 'email' => '$email' , 'password' => bcrypt ('$password'), 'api_token' => '$token']); " | php artisan tinker
"php$php_version" artisan config:clear -n
"php$php_version" artisan config:cache -n
popd