Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

elbsurfer's avatar

Installation

Hello, I want to run Laravel Spark with MAMP. I installed Spark locally with the Spark Installer.

When I try to access my localhost's public laravel folder, I get this PHP error which results in error 500:

Undefined constant 'Laravel\Spark\Providers\SparkServiceProvider in /Users/Torben/Sites/st3/st3_root/config/app.php on line 163

Why is this the case and how can I fix it?

When I go into my st3_root folder and do php artisan migrate I only see this:

Torbens-iMac:st3_root Torben$ php artisan migrate
Torbens-iMac:st3_root Torben$

The database which I set up in database.php is empty. Can anybody help here?

Just out of curiosity: When I do not use MAMP and do not want to use Homestead, how can I set up Apache/MySQL to use it locally?

0 likes
4 replies
nyedidikeke's avatar

@elbsurfer: What are your database connection strings? Are they correct?

Do check and make sure your default database choice is well defined and corresponds to the one you need (here, MySQL per your description, which is actually the default one).

In case you've enabled a local development environment, do check your .env file and update your connection parameters.

Please or to participate in this conversation.