@basiltap I don’t really follow what it is you’re trying to do. What do you mean you’re trying to “use Laravel into a custom package”?
Jul 6, 2021
4
Level 10
Is it possible to use Cashier Stripe into a Package?
I'm trying to use Laravel into a custom package to use the Stripe Integration. I have followed the documentation, but I receive an error:
Trait 'Laravel\Cashier\Billable' not found
I have an User model in the package. The documentation says to put it in the AppServiceProvider, but it doesn't work neither in the package not in the main app.
What am I missing?
The error is coming from here, in the package:
use Basiltap\Subscription\Models\Subscription;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Laravel\Cashier\Billable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use Notifiable, Billable;
Please or to participate in this conversation.