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

santoshachari's avatar

Migrate existing users to Laravel Cashier

I am working on a project, where I am building a new version of an existing application using Laravel. There are already users on the old platform, and will have to be moving them to the laravel app.

As I am using cashier, I was wondering how I can add old users, and record their subscriptions - without Stripe details. I would like to check if the user has valid subscription etc. that Cashier offers.

Thanks in Advance!

0 likes
2 replies
jekinney's avatar

Are you re doing the database too? Food for thought, instead of migrating (assuming you mean grab all users out of a database and insert into another) just use the table already set.

  1. run export on old db - import to new db (one for one column)

  2. use old DB

Otherwise there is no "easy" way of doing it. You will have to code a script/laravel command etc that maps the data you want from old db transform as needed to new db.

Off topic: The issue your asking about was to be solved by using the repository pattern as it was marketed. But never solved the issue your question id :)

Least of the worries was a hand full of model classes, it's the data transfer and setup that is the killer. Imaging a million rows of some money column in inadvertently being rounded... Potential millions of $$$ lost (Actually seen it, over 6 years, old dev used float on new db and script didn't account for $19 versus $19.00)

santoshachari's avatar

@jekinney Thank you. So as I understand, there is no good way of seeding "subscription" and "user" tables used for Laravel Cashier.

I'll handle the old customers separately. I'll keep track of .00 :).

1 like

Please or to participate in this conversation.