bkfdev/laravel-billing
A Laravel billing package for bkfdev/laravel-billing, offering a foundation for handling billing logic within Laravel applications. Early-stage with no community traction yet, so review the source and documentation before relying on it in production.
composer require <vendor>/<package> (check the release's composer.json constraints), then publish assets/config/migrations:
php artisan vendor:publish --provider="Vendor\Package\PackageServiceProvider"
php artisan migrate
config/<package>.php — table names, model bindings, feature flags.database/migrations/*_create_plans_table.php — schema, including the new icon column in v1.1.2.src/Models/Plan.php — fillable/casts and any accessors.Plan::create([
'name' => 'Pro',
'price' => 2900,
'icon' => 'heroicon-o-rocket-launch', // or an image URL, depending on your convention
]);
Then expose it through your API resource or Blade view.v1.1.2 note: icon is a new nullable column on plans. Existing installs must publish and run the new migration (or add the column manually if migrations are already tracked).
Plan::updateOrCreate(
['slug' => 'pro'],
['name' => 'Pro', 'price' => 2900, 'icon' => 'rocket']
);
<x-plan-icon :icon="$plan->icon" :fallback="'heroicon-o-sparkles'" />
icon explicitly so UI clients can render plan cards without extra lookups.
return [
'id' => $this->id,
'name' => $this->name,
'price' => $this->price,
'icon' => $this->icon,
];
icon to validation rules and form requests. Prefer a constrained format (icon name, enum, or URL) rather than free-form HTML/SVG.icon as nullable; render a default icon when it is missing so older plans created before v1.1.2 still look correct.php artisan vendor:publish again with the migration tag or copy the additive migration manually. Check with php artisan migrate:status.icon is in the package model's $fillable, or add it in your own subclass. If the package uses guarded attributes, Plan::create(['icon' => ...]) may silently drop it.icon stores a Heroicon name, a CSS class, a file path, or a URL. Mixing conventions leads to broken rendering and unsafe raw SVG output.icon to any cached serialization whitelist.Schema::hasColumn('plans', 'icon')), inspect a model instance (Plan::first()->icon), and check whether your resource/view actually references the attribute.Plan model, API resources, or Blade views if you need custom icon rendering; avoid editing vendor files directly.How can I help you explore Laravel packages today?