farb

farb

Member Since 1 Year Ago

Experience Points
420
Total
Experience

4,580 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
2
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
420 XP
Jul
08
3 months ago
Activity icon

Started a new Conversation Real Time Updae Of Notification/Announcement Sidebar

Does anyone know how to make the notificaitons/announcement sidebar update in real time, and not just onload?

Mar
20
6 months ago
Activity icon

Replied to Trouble With 'teamSubscribed' Middleware With FreeTeamPlan

Thanks @kel_ , I actually did have that in my SparkServiceProvider.php:

Spark::useStripe()->noCardUpFront()->teamTrialDays(30);

Still, it would appear that freeTeamPlan doesn't actually lead to any logic down the road. That's got to be my fault though - I can't imagine Taylor implementing that without having it do something.

Mar
19
7 months ago
Activity icon

Replied to Trouble With 'teamSubscribed' Middleware With FreeTeamPlan

FWIY I was able to solve this by copying the middleware over to my app's middleware folder and adjusting the 'teamSubscribed' to point to that custom class. I then added a third condition to the bottom return statement:

protected function subscribed($user, $subscription, $plan, $defaultSubscription)
    {

       ...

        return ($defaultSubscription && $user->currentTeam->onGenericTrial()) ||
            $user->currentTeam->subscribed($subscription, $plan) || $user->currentTeam->subscribed('DIY Free');
    }


But it feels janky and I can't see why that would be necessary if Spark has a freeTeamPlan concept. Why wouldn't that be considered? Or have I missed something?

Activity icon

Started a new Conversation Trouble With 'teamSubscribed' Middleware With FreeTeamPlan

Anyone know why the VerifyTeamIsSubscribed model (->middleware('teamSubscribed');) does not check if the team is on a free plan? It only seems to do onGenericTrial() which just checks if the trial_ends_at column is after today's date, but that should be null (result in false) on a free plan. (edited)

My spark service provider looks like:

            Spark::freeTeamPlan('DIY Free','test_1234diyfree')
                ->features($diyFree)
                ->yearly()
                ->attributes([
                    'planid'=>'plan_DIYMFree',
                    'free'=>1,
                    'category' => 'all',
                ])
                ->maxTeamMembers(3);

and the VerifyTeamIsSubscribed class gets tripped up on the onGenericTrial() where it gets false from that, of course, because the tial_ends_at is null:

class VerifyTeamIsSubscribed
{
    /**
     * Verify the incoming request's current team has a subscription.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @param  string  $subscription
     * @param  string  $plan
     * @return \Illuminate\Http\Response
     */
    public function handle($request, $next, $subscription = 'default', $plan = null)
    {
        if ($this->subscribed($request->user(), $subscription, $plan, func_num_args() === 2)) {
            return $next($request);
        }

        return $request->ajax() || $request->wantsJson()
                                ? response('Subscription Required.', 402)
                                : redirect('/settings/'.Spark::teamsPrefix().'/'.$request->user()->currentTeam->id.'#/subscription');
    }

    /**
     * Determine if the given user's current team is subscribed to the given plan.
     *
     * @param  \Illuminate\Contracts\Auth\Authenticatable  $user
     * @param  string  $subscription
     * @param  bool  $plan
     * @param  bool  $defaultSubscription
     * @return bool
     */
    protected function subscribed($user, $subscription, $plan, $defaultSubscription)
    {
        if (! $user || ! $user->currentTeam) {
            return false;
        }

        return ($defaultSubscription && $user->currentTeam->onGenericTrial()) ||
                $user->currentTeam->subscribed($subscription, $plan);
    }
}
Jul
17
1 year ago
Activity icon

Replied to Dynamic Plan Creation

Cheers Braunson!

Activity icon

Replied to One Team, One Price, Unlimited Users

Make a free plan, then maybe mask the plan they are choosing with a "Continue" button or "Join". Silently add them to the plan w/o a credit card via:

https://spark.laravel.com/docs/6.0/billing#no-credit-card-up-front

Activity icon

Started a new Conversation Dynamic Plan Creation

Hey all,

Is there a way to create dynamic plans in Spark based on user inputs?

For example, what if you have a product that is (unfortunately) a bit complicated and has to be priced differently based on the customer. Taking that further, maybe you have 3 arrays of questions with 3 radio buttons each. Based on each answer, you price accordingly. In that case you have 27 possible Plans you need to make ahead of time in your php file in Spark.

But what if it gets worse and for one of those answers, you then need to ask yet another question that maybe has 4 possible answers itself? Either way, you shouldn't have to write and maintain all of these Plans like this it seems.

Is there a way to have them dynamically made? Am I the only one who has encountered this problem?

Thanks!