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

moprocto's avatar

Can't Install Laravel Cashier on 5.2

Hello! I want to start using Stripe payments, but the Universe won't let me. Here's a portion of my composer.json

"type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*",
        "laravel/cashier": "~6.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "symfony/css-selector": "2.8.*|3.0.*",
        "symfony/dom-crawler": "2.8.*|3.0.*"
    },

when I run composer require laravel/cashier=~6.0 or composer update laravel/cashier

all I get is

Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Illuminate\Foundation\ComposerScripts::postUpdate
php artisan optimize
Generating optimized class loader

I'm not sure why it's not installing :(

0 likes
3 replies
Francismori7's avatar

Looks like it is already installed to me.

Try composer update

moprocto's avatar

updates;

So it looks like Laravel is "installed"

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Removing laravel/cashier (v6.0.0)
  - Installing laravel/cashier (v6.0.17)
    Downloading: 100%         

Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader

but when I try to add the class loader to my config/app.php file I get an error here's a portion of my file

        Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
        Illuminate\Session\SessionServiceProvider::class,
        Illuminate\Translation\TranslationServiceProvider::class,
        Illuminate\Validation\ValidationServiceProvider::class,
        Illuminate\View\ViewServiceProvider::class,
        Laravel\Cashier\CashierServiceProvider::class,

and error

FatalErrorException in ProviderRepository.php line 146:
Class 'Laravel\Cashier\CashierServiceProvider' not found

Please or to participate in this conversation.