rchase

rchase

Member Since 6 Months Ago

Experience Points
700
Total
Experience

4,300 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
700 XP
11 Sep
1 week ago

rchase left a reply on Integrating Affiliate Program Into Spark With Stripe Metadata

I found out ->withMetadata does insert the meta to Stripe, but it's under the Subscription not the Customer. As far as I could find, Cashier does not support adding metadata to the Customer, so I have to hack my own API request.

rchase left a reply on Where To Put Javascript For All Spark Pages?

Added Javascript to home.blade.php, /resources/view/welcome.blade.php and /resources/views/layouts/app.blade.php

Should be good now

rchase started a new conversation Integrating Affiliate Program Into Spark With Stripe Metadata

I can't find any info on how to submit metadata to Stripe when creating the Stripe customer.

I feel like it should be in /src/Interactions/SubscribeTeam.php

(Add ->withMetadata()) but it doesn't work

<?php

namespace Laravel\Spark\Interactions;

use Laravel\Spark\Spark;
use Illuminate\Support\Arr;
use Laravel\Spark\Contracts\Repositories\TeamRepository;
use Laravel\Spark\Events\Teams\Subscription\TeamSubscribed;
use Laravel\Spark\Contracts\Interactions\SubscribeTeam as Contract;

class SubscribeTeam implements Contract
{
    /**
     * {@inheritdoc}
     */
    public function handle($team, $plan, $fromRegistration, array $data)
    {
        $subscription = $team->newSubscription('default', $plan->id);
        $subscription->withMetadata(['property_id' => 'test']); 

rchase started a new conversation Where To Put Javascript For All Spark Pages?

If I want to add Google Analytics for example, does anyone know where to put the code so it appears on all Spark pages?

09 Sep
1 week ago

rchase left a reply on Event/Listener Namespace Issue

Resolved this, I was overriding Spark::createUsersWith in SparkServiceProvider.php but forgot to import the event there.

rchase started a new conversation Event/Listener Namespace Issue

When registering I get HTTP 500 "message: "Class 'App\Providers\HookUserRegistered' not found""

I think it's because of the namespace but I'm not sure how to override that and use App\Listeners\HookUserRegistered instead.

namespace App\Providers;

use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;

class EventServiceProvider extends ServiceProvider
{
    /**
     * The event listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [

        'Laravel\Spark\Events\Auth\UserRegistered' => [
              'App\Listeners\HookUserRegistered',
        ],

        // User Related Events...
        'Laravel\Spark\Events\Subscription\UserSubscribed' => [
            'Laravel\Spark\Listeners\Subscription\UpdateActiveSubscription',
            'Laravel\Spark\Listeners\Subscription\UpdateTrialEndingDate',
        ],

        'Laravel\Spark\Events\Profile\ContactInformationUpdated' => [
            'Laravel\Spark\Listeners\Profile\UpdateContactInformationOnStripe',
        ],

        'Laravel\Spark\Events\PaymentMethod\VatIdUpdated' => [
            'Laravel\Spark\Listeners\Subscription\UpdateTaxPercentageOnStripe',
        ],

        'Laravel\Spark\Events\PaymentMethod\BillingAddressUpdated' => [
            'Laravel\Spark\Listeners\Subscription\UpdateTaxPercentageOnStripe',
        ],

        'Laravel\Spark\Events\Subscription\SubscriptionUpdated' => [
            'Laravel\Spark\Listeners\Subscription\UpdateActiveSubscription',
        ],

        'Laravel\Spark\Events\Subscription\SubscriptionCancelled' => [
            'Laravel\Spark\Listeners\Subscription\UpdateActiveSubscription',
        ],

        // Team Related Events...
        'Laravel\Spark\Events\Teams\TeamCreated' => [
            'Laravel\Spark\Listeners\Teams\UpdateOwnerSubscriptionQuantity',
        ],

        'Laravel\Spark\Events\Teams\TeamDeleted' => [
            'Laravel\Spark\Listeners\Teams\UpdateOwnerSubscriptionQuantity',
        ],

        'Laravel\Spark\Events\Teams\TeamMemberAdded' => [
            'Laravel\Spark\Listeners\Teams\UpdateTeamSubscriptionQuantity',
        ],

        'Laravel\Spark\Events\Teams\TeamMemberRemoved' => [
            'Laravel\Spark\Listeners\Teams\UpdateTeamSubscriptionQuantity',
        ],

        'Laravel\Spark\Events\Teams\Subscription\TeamSubscribed' => [
            'Laravel\Spark\Listeners\Teams\Subscription\UpdateActiveSubscription',
            'Laravel\Spark\Listeners\Teams\Subscription\UpdateTrialEndingDate',
        ],

        'Laravel\Spark\Events\Teams\Subscription\SubscriptionUpdated' => [
            'Laravel\Spark\Listeners\Teams\Subscription\UpdateActiveSubscription',
        ],

        'Laravel\Spark\Events\Teams\Subscription\SubscriptionCancelled' => [
            'Laravel\Spark\Listeners\Teams\Subscription\UpdateActiveSubscription',
        ],

        'Laravel\Spark\Events\Teams\UserInvitedToTeam' => [
            'Laravel\Spark\Listeners\Teams\CreateInvitationNotification',
        ],
    ];

    /**
     * Register any other events for your application.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();

        //
    }
}
07 Jun
3 months ago

rchase left a reply on Base Rate + Per Seat Billing?

It looks like there is nothing out there on how to do this. I just thought of a trick though, I will start the quantity off at 4 ($20) then as they add widgets for $5 each it will increment from there.

rchase started a new conversation Base Rate + Per Seat Billing?

Does anyone know how I could charge $19/mo base + $5/seat in Spark?

26 Mar
5 months ago

rchase left a reply on Stripe Webhook Failing

It seems if I can't get it fixed, at least the site will still work. I think the only thing affected by this is the user can't see invoices.

rchase started a new conversation Stripe Webhook Failing

Stripe started complaining that the Spark webhook for Stripe is failing. I'm not sure how to start troubleshooting or why this happened. Any ideas?

25 Mar
5 months ago

rchase started a new conversation How To Track Conversions (Google) On Spark?

Normally I would put some code on the "Transaction success" page of a checkout process which would mark in Google Analytics that a conversion occurred, but since Spark goes straight to the dashboard page after transaction I can't tell how to differentiate between a purchase and normal login.

Anyone else find a solution for this?

19 Mar
6 months ago

rchase left a reply on How To Undo Php Artisan Make:auth

Yeah thanks for the suggestion, I actually found that as a recommendation when looking it up and tried it.

rchase left a reply on How To Undo Php Artisan Make:auth

I did actually!

rchase left a reply on How Can I Define A Route That Doesn't Redirect To Team Missing Page

I have a custom landing page for welcome.blade.php, and then I configured the Spark logo in the dashboard to go back to welcome.blade.php instead of going to /home.

But I found out if the user does not have a team, he is constantly redirected to /home and unable to get to welcome.blade.php because of the middleware.

Here is what I did to allow him to go back to welcome.blade.php without being redirected:

/spark/src/Http/Middleware/VerifyUserHasTeam.php

namespace Laravel\Spark\Http\Middleware;

use Laravel\Spark\Spark;

class VerifyUserHasTeam
{
    /**
     * Verify the incoming request's user belongs to team.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return \Illuminate\Http\Response
     */
    public function handle($request, $next)
    {
        if ($request->url() === "/" || $request->url()  === "https://captifi.net" || $request->url() === "https://captifi.net/" || $request->url() === "http://captifi.net" || $request->url() === "http://captifi.net/") {
            return $next($request);
        }
        if (Spark::usesTeams() && $request->user() && ! $request->user()->hasTeams()) {
            return redirect(Spark::teamsPrefix().'/missing');
        }

        return $next($request);
    }
}
18 Mar
6 months ago

rchase left a reply on How To Undo Php Artisan Make:auth

@SHEDCOLLECTIVE - Yeah I even opened up the make:auth function of php artisan and I reverted every thing it did and still couldn't get it restored. It was weird.

rchase left a reply on Spark CSS - How Big Is Too Big?

I also tried to change the look and feel of the Spark theme and just gave up. Decided to have a fancy landing page instead and then just make Spark navbar look somewhat similar and that's it. https://captifi.net

rchase left a reply on Any Resources For How I Can Decouple Laravel Spark From My App?

Just read about someone in your similar situation who outgrew Spark.

If it were me, I wouldn't try to hack major changes into Spark. Start fresh with a version 2.0 instead.

This guy switched to PHP Lumen as the REST API and VueJS as the frontend, that would be my choice too:

https://medium.com/once-upon-a-site/why-we-chose-laravel-spark-and-later-dropped-it-55552309d7bd

rchase left a reply on How To Undo Php Artisan Make:auth

It didn't work. But I was able to recover from a backup.

rchase left a reply on Spark Billing Nav Still Shown For Team Members

Confusing yeah, I have team billing as well, but billing per team not per member. Anyways, when you log in as a team member, it is not only reminding you of a Team trial, but also USER trial.

I got around this by hiding all the trial notices

resources > views > vendor > spark > settings > subscription > trial-expiration-notice.blade.php

HTML commented it out:

<!-- <div class="alert alert-warning mb-4" v-if="subscriptionIsOnTrial">
    <?php echo __('You are currently within your free trial period. Your trial will expire on :date.', ['date' => '<strong>{{ trialEndsAt }}</strong>']); ?>
</div>
-->

resources > views > vendor > spark > nav > subscription > subscriptions.php

HTML commented it out:

<!-- @if (Auth::user()->onTrial())
    <!-- Trial Reminder -->
    <h6 class="dropdown-header">{{__('Trial')}}</h6>

    <a class="dropdown-item" href="/settings#/subscription">
        <i class="fa fa-fw text-left fa-btn fa-shopping-bag"></i> {{__('Subscribe')}}
    </a>

    <div class="dropdown-divider"></div>
@endif

 @if (Spark::usesTeams() && Auth::user()->ownsCurrentTeam() && Auth::user()->currentTeamOnTrial())
    <!-- Team Trial Reminder -->
    <h6 class="dropdown-header">{{__('teams.team_trial')}}</h6>

    <a class="dropdown-item" href="/settings/{{ Spark::teamsPrefix() }}/{{ Auth::user()->currentTeam()->id }}#/subscription">
        <i class="fa fa-fw text-left fa-btn fa-shopping-bag"></i> {{__('Subscribe')}}
    </a>

    <div class="dropdown-divider"></div>
@endif
-->

rchase started a new conversation What Happens To Team Subscription When Team Is Deleted?

It appears when a team is deleted, the subscription remains active.

The logic should be, IMO, if the last remaining member of a team deletes the team, the team sub should be canceled with it.

This will be a potential support nightmare, I can already see it.

17 Mar
6 months ago

rchase left a reply on How To Undo Php Artisan Make:auth

@CRONIX - Time to start using git ...

rchase left a reply on Disable Laravel Spark Teams On Registration

I am using teams as "servers" for https://captifi.net. I wanted to remove the name requirement from the sign-up form so that the user only has to input their email and password to sign up. I couldn't figure out how to really remove the team name since it is needed in order to be referenced in Spark, so instead I set a variable in Vue to default the server name to "Server Name" and the user can change later after signing up. Removed the name input from the form and it worked. Same with the user's name, I defaulted it to "Name" so that they can sign up without it and change it later.

Under resources > spark-components > auth > register-stripe.js:


Vue.component('spark-register-stripe', {

    mixins: [base],
    data: function () {
  return {
    registerForm: {team: "Server Name", name: "Name"},

  }
}
});

rchase started a new conversation How To Undo Php Artisan Make:auth

I wasn't able to get Email Verification working in Spark, and a post I came across said to try php artisan make:auth. Well I did and now my site is toasted.

I tried undoing by removing the files and routes it created, but it still crashes: https://captifi.net/login

I don't know what else to do... any ideas?