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

Mike Swan's avatar

Laravel Spark Deployment Issues

Hi All,

I'm trying to install Laravel Spark to an application and it seems like I'm missing something. Everything works locally but Forge will not deploy it in production. This is the error I am getting.

Class "Spark\Spark" not found

at app/Providers/SparkServiceProvider.php:21 17▕ * @return void 18▕ */ 19▕ public function boot() 20▕ { ➜ 21▕ Spark::billable(User::class)->resolve(function (Request $request) { 22▕ return $request->user(); 23▕ }); 24▕ 25▕ Spark::billable(User::class)->authorize(function (User $billable, Request $request) {

  +7 vendor frames 

8 [internal]:0 Illuminate\Foundation\Application::Illuminate\Foundation{closure}()

  +5 vendor frames 

14 artisan:37 Illuminate\Foundation\Console\Kernel::handle()\

Any thoughts or comments would be appreciated. Thanks!

0 likes
2 replies
mil_'s avatar

I had similar problem with instaling spark on forge what i did was ssh into server then run composer install and put credentials for spark because otherwise forge didnt have access to pull spark repo

Mike Swan's avatar

I ended up just running this command. Seems to be working now.

composer config http-basic.spark.laravel.com ${SPARK_USERNAME} ${SPARK_API_TOKEN}

Thanks for the reply.

Please or to participate in this conversation.