{"id":16068379,"url":"https://github.com/unicodeveloper/laravel-sparkle","last_synced_at":"2025-12-30T16:12:42.382Z","repository":{"id":87983968,"uuid":"56908075","full_name":"unicodeveloper/laravel-sparkle","owner":"unicodeveloper","description":"Fork of Former Open Sourced Laravel Spark, Now Sparkle ","archived":false,"fork":false,"pushed_at":"2016-04-23T08:44:05.000Z","size":258,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-07T18:51:34.667Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unicodeveloper.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-23T08:09:58.000Z","updated_at":"2024-03-29T16:38:34.000Z","dependencies_parsed_at":"2023-03-03T04:30:24.211Z","dependency_job_id":null,"html_url":"https://github.com/unicodeveloper/laravel-sparkle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unicodeveloper/laravel-sparkle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-sparkle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-sparkle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-sparkle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-sparkle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unicodeveloper","download_url":"https://codeload.github.com/unicodeveloper/laravel-sparkle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-sparkle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280450220,"owners_count":26332843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T06:20:56.560Z","updated_at":"2025-10-22T14:30:37.728Z","avatar_url":"https://github.com/unicodeveloper.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sparkle\n\n- [Introduction](#introduction)\n- [Installation](#installation)\n- [Defining Subscription Plans](#defining-subscription-plans)\n- [Teams](#teams)\n- [Customizing Spark Views](#customizing-spark-views)\n- [Customizing Spark JavaScript](#customizing-spark-javascript)\n\n\u003ca name=\"introduction\"\u003e\u003c/a\u003e\n## Introduction\n\n**This is an alpha, experimental release of Spark. Things will change. Things will break. Thank you for testing!**\n\nSparkle is an experimental project primarily intended for building business oriented SaaS applications, and is highly opinionated towards that use case.\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\n## Installation\n\nFirst, install the Spark installer and make sure that the global Composer `bin` directory is within your system's `$PATH`:\n```\n\tcomposer global require \"laravel/spark-installer=~1.0\"\n```\nNext, create a new Laravel application and install Spark:\n```\n\tlaravel new application\n\n\tcd application\n\n\tspark install\n```\nAfter installing Sparkle, be sure to migrate your database, install the NPM dependencies, and run the `gulp` command. You should also set the `AUTHY_KEY`, `STRIPE_KEY`, and `STRIPE_SECRET` environment variables in your `.env` file.\n\nYou may also wish to review the `SparkServiceProvider` class that was installed in your application. This provider is the central location for customizing your Spark installation.\n\n\u003ca name=\"defining-subscription-plans\"\u003e\u003c/a\u003e\n## Defining Subscription Plans\n\nSubscription plans may be defined in your `app/Providers/SparkServiceProvider.php` file. This file contains a `customizeSubscriptionPlans` method. Within this method, you may define all of your application's subscription plans. There are a few examples in the method to get you started.\n\nWhen defining a Spark plan, the `plan` method accepts two arguments: the name of the plan and the Stripe ID of the plan. Be sure that the Stripe ID given to the `plan` method corresponds to a plan ID on your Stripe account:\n```php\n\tSpark::plan('Display Name', 'stripe-id')\n\t\t-\u003eprice(10)\n\t\t-\u003efeatures([\n\t\t\t//\n\t\t]);\n```\n\n### Yearly Plans\n\nTo define a yearly plan, simply call the `yearly` method on the plan definition:\n```php\n\tSpark::plan('Basic', 'basic-yearly')\n\t\t-\u003eprice(100)\n\t\t-\u003eyearly()\n\t\t-\u003efeatures(\n\t\t\t//\n\t\t);\n```\n### Coupons\n\nTo use a coupon, simply create the coupon on Stripe and access the `/register` route with a `coupon` query string variable that matches the ID of the coupon on Stripe.\n\n\t    http://stripe.app/register?coupon=code\n\nSite-wide promotions may be run using the `Spark::promotion` method within your `SparkServiceProvider`:\n```php\n\tSpark::promotion('coupon-code');\n```\n\u003ca name=\"teams\"\u003e\u003c/a\u003e\n## Teams\n\nTo enable teams, simply use the `CanJoinTeams` trait on your `User` model. The trait has already been imported in the top of the file, so you only need to add it to the model itself:\n```php\n\tclass User extends Model implements TwoFactorAuthenticatableContract,\n\t                                    BillableContract,\n\t                                    CanResetPasswordContract\n\t{\n\t    use Billable, CanJoinTeams, CanResetPassword, TwoFactorAuthenticatable;\n\t}\n```\nOnce teams are enabled, a team name will be required during registration, and a `Teams` tab will be available in the user settings dashboard.\n\n### Roles\n\nTeam roles may be defined in the `customizeRoles` method of the `SparkServiceProvider`.\n\n\u003ca name=\"customizing-spark-views\"\u003e\u003c/a\u003e\n## Customizing Spark Views\n\nYou may publish Spark's common Blade views by using the `vendor:publish` command:\n\n```\n\tphp artisan vendor:publish --tag=spark-basics\n```\n\nAll published views will be placed in `resources/views/vendor/spark`.\n\nIf you would like to publish every Spark view, you may use the `spark-full` tag:\n\n```\n\tphp artisan vendor:publish --tag=spark-full\n```\n\n\u003ca name=\"customizing-spark-javascript\"\u003e\u003c/a\u003e\n## Customizing Spark JavaScript\n\nThe `resources/assets/js/spark/components.js` file contains the statements to load some common Spark Vue components. [Vue](http://vuejs.org) is the JavaScript framework used by the Spark registration and settings screens.\n\nYou are free to change any of these require statements to load your own Vue component for a given screen. Most likely, you will want to copy the original component as a starting point for your customization.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicodeveloper%2Flaravel-sparkle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funicodeveloper%2Flaravel-sparkle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicodeveloper%2Flaravel-sparkle/lists"}