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

maidul98's avatar

Class 'Amranidev\Laracombee\facades\LaracombeeFacade' not found

I'm trying to deploy a package called Laracombee and it works fine on localhost, but when i try to push it to Heroku i get the following error.

In the terminal I run the following command to push updates to Heroku:

PS C:\Users\coolm\Desktop\want_api> git push heroku master
Enumerating objects: 18, done.
Counting objects: 100% (18/18), done.
Delta compression using up to 4 threads
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 1.65 KiB | 337.00 KiB/s, done.
Total 10 (delta 7), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> PHP app detected
remote: -----> Bootstrapping...
remote: -----> Installing platform packages...
remote:        - php (7.3.6)
remote:        - ext-gd (bundled with php)
remote:        - ext-mbstring (bundled with php)
remote:        - apache (2.4.39)
remote:        - nginx (1.16.0)
remote: -----> Installing dependencies...
remote:        Composer version 1.8.5 2019-04-09 17:46:47
remote:        Loading composer repositories with package information
remote:        Installing dependencies from lock file
remote:        Package operations: 87 installs, 0 updates, 0 removals
remote:          - Installing psr/simple-cache (1.0.1): Loading from cache
remote:          - Installing psr/log (1.1.0): Loading from cache
remote:          - Installing psr/http-message (1.0.1): Loading from cache
remote:          - Installing algolia/algoliasearch-client-php (2.2.0): Loading from cache
remote:          - Installing rmccue/requests (v1.7.0): Loading from cache
remote:          - Installing recombee/php-api-client (v2.4.0): Loading from cache
remote:          - Installing guzzlehttp/promises (v1.3.1): Loading from cache
remote:          - Installing amranidev/laracombee (v0.1.37): Loading from cache
remote:          - Installing symfony/polyfill-ctype (v1.11.0): Loading from cache
remote:          - Installing vlucas/phpdotenv (v2.6.1): Loading from cache
remote:          - Installing symfony/css-selector (v4.3.0): Loading from cache
remote:          - Installing tijsverkoyen/css-to-inline-styles (2.2.1): Loading from cache
remote:          - Installing symfony/polyfill-php72 (v1.11.0): Loading from cache
remote:          - Installing symfony/polyfill-mbstring (v1.11.0): Loading from cache
remote:          - Installing symfony/var-dumper (v4.3.0): Loading from cache
remote:          - Installing symfony/routing (v4.3.0): Loading from cache
remote:          - Installing symfony/process (v4.3.0): Loading from cache
remote:          - Installing symfony/polyfill-php73 (v1.11.0): Loading from cache
remote:          - Installing symfony/polyfill-intl-idn (v1.11.0): Loading from cache
remote:          - Installing symfony/mime (v4.3.0): Loading from cache
remote:          - Installing symfony/http-foundation (v4.3.0): Loading from cache
remote:          - Installing symfony/event-dispatcher-contracts (v1.1.1): Loading from cache
remote:          - Installing symfony/event-dispatcher (v4.3.0): Loading from cache
remote:          - Installing symfony/debug (v4.3.0): Loading from cache
remote:          - Installing symfony/http-kernel (v4.3.0): Loading from cache
remote:          - Installing symfony/finder (v4.3.0): Loading from cache
remote:          - Installing symfony/service-contracts (v1.1.2): Loading from cache
remote:          - Installing symfony/console (v4.3.0): Loading from cache
remote:          - Installing symfony/polyfill-iconv (v1.11.0): Loading from cache
remote:          - Installing doctrine/lexer (v1.0.1): Loading from cache
remote:          - Installing egulias/email-validator (2.1.8): Loading from cache
remote:          - Installing swiftmailer/swiftmailer (v6.2.1): Loading from cache
remote:          - Installing paragonie/random_compat (v9.99.99): Loading from cache
remote:          - Installing ramsey/uuid (3.8.0): Loading from cache
remote:          - Installing psr/container (1.0.0): Loading from cache
remote:          - Installing opis/closure (3.3.0): Loading from cache
remote:          - Installing symfony/translation-contracts (v1.1.2): Loading from cache
remote:          - Installing symfony/translation (v4.3.0): Loading from cache
remote:          - Installing nesbot/carbon (1.32.0): Loading from cache
remote:          - Installing monolog/monolog (1.24.0): Loading from cache
remote:          - Installing league/flysystem (1.0.52): Loading from cache
remote:          - Installing ralouphie/getallheaders (2.0.5): Loading from cache
remote:          - Installing guzzlehttp/psr7 (1.5.2): Loading from cache
remote:          - Installing guzzlehttp/guzzle (6.3.3): Loading from cache
remote:          - Installing laravel/slack-notification-channel (v1.0.3): Loading from cache
remote:          - Installing psr/http-factory (1.0.1): Loading from cache
remote:          - Installing zendframework/zend-diactoros (2.1.2): Loading from cache
remote:          - Installing php-http/promise (v1.0.0): Loading from cache
remote:          - Installing php-http/httplug (v1.1.0): Loading from cache
remote:          - Installing php-http/guzzle6-adapter (v1.1.1): Loading from cache
remote:          - Installing lcobucci/jwt (3.3.1): Loading from cache
remote:          - Installing nexmo/client (1.8.1): Loading from cache
remote:          - Installing laravel/nexmo-notification-channel (v1.0.1): Loading from cache
remote:          - Installing erusev/parsedown (1.7.3): Loading from cache
remote:          - Installing dragonmantank/cron-expression (v2.3.0): Loading from cache
remote:          - Installing doctrine/inflector (v1.3.0): Loading from cache
remote:          - Installing laravel/framework (v5.7.28): Loading from cache
remote:          - Installing awobaz/compoships (1.1.13): Loading from cache
remote:          - Installing asm89/stack-cors (1.2.0): Loading from cache
remote:          - Installing barryvdh/laravel-cors (v0.11.3): Loading from cache
remote:          - Installing fideloper/proxy (4.1.0): Loading from cache
remote:          - Installing intervention/image (dev-master a8fca2a): Loading from cache
remote:          - Installing jakub-onderka/php-console-color (v0.2): Loading from cache
remote:          - Installing symfony/psr-http-message-bridge (v1.2.0): Loading from cache
remote:          - Installing phpseclib/phpseclib (2.0.17): Loading from cache
remote:          - Installing league/event (2.2.0): Loading from cache
remote:          - Installing defuse/php-encryption (v2.2.1): Loading from cache
remote:          - Installing league/oauth2-server (7.4.0): Loading from cache
remote:          - Installing firebase/php-jwt (v5.0.0): Loading from cache
remote:          - Installing laravel/passport (v7.3.0): Loading from cache
remote:          - Installing laravel/scout (v7.1.2): Loading from cache
remote:          - Installing league/oauth1-client (1.7.0): Loading from cache
remote:          - Installing laravel/socialite (v4.1.3): Loading from cache
remote:          - Installing nikic/php-parser (v4.2.2): Loading from cache
remote:          - Installing jakub-onderka/php-console-highlighter (v0.4): Loading from cache
remote:          - Installing dnoegel/php-xdg-base-dir (0.1): Loading from cache
remote:          - Installing psy/psysh (v0.9.9): Loading from cache
remote:          - Installing laravel/tinker (v1.0.8): Loading from cache
remote:          - Installing mtdowling/jmespath.php (2.4.0): Loading from cache
remote:          - Installing aws/aws-sdk-php (3.99.2): Loading from cache
remote:          - Installing league/flysystem-aws-s3-v3 (1.0.23): Loading from cache
remote:          - Installing liliom/laravel-firebase (v1.0.1): Loading from cache
remote:          - Installing paralleldots/apis (dev-master 6c66ca4): Loading from cache
remote:          - Installing paragonie/sodium_compat (v1.10.0): Loading from cache
remote:          - Installing pusher/pusher-php-server (v3.4.1): Loading from cache
remote:          - Installing staudenmeir/eloquent-eager-limit (v1.0): Loading from cache
remote:          - Installing stripe/stripe-php (v6.37.0): Loading from cache
remote:        Generating optimized autoload files
remote:        > Illuminate\Foundation\ComposerScripts::postAutoloadDump
remote:        > @php artisan package:discover
remote:        Discovered Package: amranidev/laracombee
remote:        Discovered Package: awobaz/compoships
remote:        Discovered Package: barryvdh/laravel-cors
remote:        Discovered Package: fideloper/proxy
remote:        Discovered Package: intervention/image
remote:        Discovered Package: laravel/nexmo-notification-channel
remote:        Discovered Package: laravel/passport
remote:        Discovered Package: laravel/scout
remote:        Discovered Package: laravel/slack-notification-channel
remote:        Discovered Package: laravel/socialite
remote:        Discovered Package: laravel/tinker
remote:        Discovered Package: liliom/laravel-firebase
remote:        Discovered Package: nesbot/carbon
remote:        Package manifest generated successfully.
remote:        > php artisan clear-compiled
remote:        Compiled services and packages files removed!
remote:        > chmod -R 777 storage
remote:        > php artisan passport:keys
remote:        Encryption keys generated successfully.
remote: -----> Preparing runtime environment...
remote: -----> Checking for additional extensions to install...
remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote:
remote: -----> Compressing...
remote:        Done: 22.3M
remote: -----> Launching...
remote:        Released v278
remote:        https://dry-mesa-87903.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/XX-XX-87903.git
   785cf4b..0544ee2  master -> master

Then I run this to migrate the users: heroku run php artisan laracombee:migrate user

Once I run this, I get this error:

In AliasLoader.php line 80:
                                                                   
  [ErrorException]                                                 
  Class 'Amranidev\Laracombee\facades\LaracombeeFacade' not found  
                                                                   

Exception trace:
 () at /app/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php:80
 Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() at n/a:n/a
 class_alias() at /app/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php:80
 Illuminate\Foundation\AliasLoader->load() at n/a:n/a
 spl_autoload_call() at /app/vendor/amranidev/laracombee/src/Console/LaracombeeCommand.php:32
 Amranidev\Laracombee\Console\LaracombeeCommand->addUserProperty() at /app/vendor/amranidev/laracombee/src/Console/Commands/MigrateCommand.php:66
 Amranidev\Laracombee\Console\Commands\MigrateCommand->Amranidev\Laracombee\Console\Commands\{closure}() at n/a:n/a
 array_map() at /app/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1034
 Illuminate\Support\Collection->map() at /app/vendor/amranidev/laracombee/src/Console/Commands/MigrateCommand.php:67
 Amranidev\Laracombee\Console\Commands\MigrateCommand->prepareScope() at /app/vendor/amranidev/laracombee/src/Console/Commands/MigrateCommand.php:42
 Amranidev\Laracombee\Console\Commands\MigrateCommand->handle() at n/a:n/a
 call_user_func_array() at /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
 Illuminate\Container\BoundMethod::callBoundMethod() at /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
 Illuminate\Container\BoundMethod::call() at /app/vendor/laravel/framework/src/Illuminate/Container/Container.php:572
 Illuminate\Container\Container->call() at /app/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
 Illuminate\Console\Command->execute() at /app/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /app/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
 Illuminate\Console\Command->run() at /app/vendor/symfony/console/Application.php:921
 Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /app/vendor/laravel/framework/src/Illuminate/Console/Application.php:89
 Illuminate\Console\Application->run() at /app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:122
 Illuminate\Foundation\Console\Kernel->handle() at /app/artisan:37

Any thoughts on how to fix this?

0 likes
3 replies
maidul98's avatar

@BOBBYBOUWMANN - I already have that in there that's why I'm confused on why it works on my localhost and not on heroku

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Application Name
    |--------------------------------------------------------------------------
    |
    | This value is the name of your application. This value is used when the
    | framework needs to place the application's name in a notification or
    | any other location as required by the application or its packages.
    |
    */

    'name' => env('APP_NAME', 'Laravel'),

    /*
    |--------------------------------------------------------------------------
    | Application Environment
    |--------------------------------------------------------------------------
    |
    | This value determines the "environment" your application is currently
    | running in. This may determine how you prefer to configure various
    | services the application utilizes. Set this in your ".env" file.
    |
    */

    'env' => env('APP_ENV', 'production'),

    /*
    |--------------------------------------------------------------------------
    | Application Debug Mode
    |--------------------------------------------------------------------------
    |
    | When your application is in debug mode, detailed error messages with
    | stack traces will be shown on every error that occurs within your
    | application. If disabled, a simple generic error page is shown.
    |
    */

    'debug' => env('APP_DEBUG', false),

    /*
    |--------------------------------------------------------------------------
    | Application URL
    |--------------------------------------------------------------------------
    |
    | This URL is used by the console to properly generate URLs when using
    | the Artisan command line tool. You should set this to the root of
    | your application so that it is used when running Artisan tasks.
    |
    */

    'url' => env('APP_URL', 'http://localhost'),

    /*
    |--------------------------------------------------------------------------
    | Application Timezone
    |--------------------------------------------------------------------------
    |
    | Here you may specify the default timezone for your application, which
    | will be used by the PHP date and date-time functions. We have gone
    | ahead and set this to a sensible default for you out of the box.
    |
    */

    'timezone' => 'America/New_York',

    /*
    |--------------------------------------------------------------------------
    | Application Locale Configuration
    |--------------------------------------------------------------------------
    |
    | The application locale determines the default locale that will be used
    | by the translation service provider. You are free to set this value
    | to any of the locales which will be supported by the application.
    |
    */

    'locale' => 'en',

    /*
    |--------------------------------------------------------------------------
    | Application Fallback Locale
    |--------------------------------------------------------------------------
    |
    | The fallback locale determines the locale to use when the current one
    | is not available. You may change the value to correspond to any of
    | the language folders that are provided through your application.
    |
    */

    'fallback_locale' => 'en',

    /*
    |--------------------------------------------------------------------------
    | Encryption Key
    |--------------------------------------------------------------------------
    |
    | This key is used by the Illuminate encrypter service and should be set
    | to a random, 32 character string, otherwise these encrypted strings
    | will not be safe. Please do this before deploying an application!
    |
    */

    'key' => env('APP_KEY'),

    'cipher' => 'AES-256-CBC',

    /*
    |--------------------------------------------------------------------------
    | Autoloaded Service Providers
    |--------------------------------------------------------------------------
    |
    | The service providers listed here will be automatically loaded on the
    | request to your application. Feel free to add your own services to
    | this array to grant expanded functionality to your applications.
    |
    */

    'providers' => [

        /*
         * Laravel Framework Service Providers...
         */
        Illuminate\Auth\AuthServiceProvider::class,
        App\Providers\BroadcastServiceProvider::class,
        Intervention\Image\ImageServiceProvider::class,
        Laravel\Passport\PassportServiceProvider::class,
        Illuminate\Broadcasting\BroadcastServiceProvider::class,
        Illuminate\Bus\BusServiceProvider::class,
        Illuminate\Cache\CacheServiceProvider::class,
        Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
        Illuminate\Cookie\CookieServiceProvider::class,
        Illuminate\Database\DatabaseServiceProvider::class,
        Illuminate\Encryption\EncryptionServiceProvider::class,
        Illuminate\Filesystem\FilesystemServiceProvider::class,
        Illuminate\Foundation\Providers\FoundationServiceProvider::class,
        Illuminate\Hashing\HashServiceProvider::class,
        Illuminate\Mail\MailServiceProvider::class,
        Illuminate\Notifications\NotificationServiceProvider::class,
        Illuminate\Pagination\PaginationServiceProvider::class,
        Illuminate\Pipeline\PipelineServiceProvider::class,
        Illuminate\Queue\QueueServiceProvider::class,
        Illuminate\Redis\RedisServiceProvider::class,
        Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
        Illuminate\Session\SessionServiceProvider::class,
        Illuminate\Translation\TranslationServiceProvider::class,
        Illuminate\Validation\ValidationServiceProvider::class,
        Illuminate\View\ViewServiceProvider::class,

        /*
         * Package Service Providers...
         */
        Laravel\Socialite\SocialiteServiceProvider::class,
        /*
         * Application Service Providers...
         */
        App\Providers\AppServiceProvider::class,
        App\Providers\AuthServiceProvider::class,
        App\Providers\BroadcastServiceProvider::class,
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,
        Amranidev\Laracombee\Providers\LaracombeeServiceProvider::class,

    ],

    /*
    |--------------------------------------------------------------------------
    | Class Aliases
    |--------------------------------------------------------------------------
    |
    | This array of class aliases will be registered when this application
    | is started. However, feel free to register as many as you wish as
    | the aliases are "lazy" loaded so they don't hinder performance.
    |
    */

    'aliases' => [
        'App' => Illuminate\Support\Facades\App::class,
        'Socialite' => Laravel\Socialite\Facades\Socialite::class,
        'Stripe' => Cartalyst\Stripe\Laravel\Facades\Stripe::class,
        'Image' => Intervention\Image\Facades\Image::class,
        'Artisan' => Illuminate\Support\Facades\Artisan::class,
        'Auth' => Illuminate\Support\Facades\Auth::class,
        'Blade' => Illuminate\Support\Facades\Blade::class,
        'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
        'Bus' => Illuminate\Support\Facades\Bus::class,
        'Cache' => Illuminate\Support\Facades\Cache::class,
        'Config' => Illuminate\Support\Facades\Config::class,
        'Cookie' => Illuminate\Support\Facades\Cookie::class,
        'Crypt' => Illuminate\Support\Facades\Crypt::class,
        'DB' => Illuminate\Support\Facades\DB::class,
        'Eloquent' => Illuminate\Database\Eloquent\Model::class,
        'Event' => Illuminate\Support\Facades\Event::class,
        'File' => Illuminate\Support\Facades\File::class,
        'Gate' => Illuminate\Support\Facades\Gate::class,
        'Hash' => Illuminate\Support\Facades\Hash::class,
        'Lang' => Illuminate\Support\Facades\Lang::class,
        'Log' => Illuminate\Support\Facades\Log::class,
        'Mail' => Illuminate\Support\Facades\Mail::class,
        'Notification' => Illuminate\Support\Facades\Notification::class,
        'Password' => Illuminate\Support\Facades\Password::class,
        'Queue' => Illuminate\Support\Facades\Queue::class,
        'Redirect' => Illuminate\Support\Facades\Redirect::class,
        'Redis' => Illuminate\Support\Facades\Redis::class,
        'Request' => Illuminate\Support\Facades\Request::class,
        'Response' => Illuminate\Support\Facades\Response::class,
        'Route' => Illuminate\Support\Facades\Route::class,
        'Schema' => Illuminate\Support\Facades\Schema::class,
        'Session' => Illuminate\Support\Facades\Session::class,
        'Storage' => Illuminate\Support\Facades\Storage::class,
        'URL' => Illuminate\Support\Facades\URL::class,
        'Validator' => Illuminate\Support\Facades\Validator::class,
        'View' => Illuminate\Support\Facades\View::class,
        'Laracombee' => Amranidev\Laracombee\facades\LaracombeeFacade::class
    ],

];


Nash's avatar
Nash
Best Answer
Level 20

The facade alias in the readme file's example uses a lower case "f" (like you have now) but the directory + namespace actually has a capital "F". Linux is case-sensitive so it will not find the class. I submitted a PR to fix this in the docs.

1 like

Please or to participate in this conversation.