Skip to content
Advertisement

Cannot clear laravel migrations because of invalid database url config

I accidentally added a wrong database url to my Laravel config now every time I try doing anything with artisan I get this error

 InvalidArgumentException 

  The database configuration URL is malformed.

I already removed that line but now I can’t clear the cache for the config and every time I do anything with artisan I get the same error even when I just run php artisan help , something like an infinite loop where laravel has to clear the cache to get rid of the bug but I can’t clear it because of the bug

Advertisement

Answer

Try

composer dump-autoload
php artisan config:cache

If it didn’t work could you share the config file

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement