benbowler

benbowler

Member Since 11 Months Ago

Experience Points 140
Experience Level 1

4,860 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.

10 Oct
9 months ago

benbowler left a reply on Subscription Isnt Working On Spark

Actually it's not even the product id it's the plan id within a product.

You create a product, then a price plan and it's that id. If you let Stripe create the ids it will look like plan_XXXXXXXXXXXX.

I just spent half an hour looking at this so thought I'd contribute to anyone out there at the same point in future.

08 Oct
9 months ago

benbowler left a reply on Upload Profile Image To S3 Bucket

The issue with this is that the file is uploaded with put rather than storePublicaly so it won't be default be publicly accessible.

07 Oct
9 months ago

benbowler left a reply on Accessing Homestead/Vagrant Site From Different Device On Same Network

@5pArxz Good solution, you don't actually need to update the hosts file for that to work. You can just hit [LOCAL NETWORK IP]:8000. Easy :)

24 Aug
10 months ago

benbowler started a new conversation UserRegistered Event Looses All Data Except Tax_code When Passed To Listener

I've created a Laravel Listener on the UserRegistered event to link up some data to the users account based on their email. I've hit a bit of a wall however. I broadly followed this Stack Overflow post and created a nice Listener pretty easily. -> https://stackoverflow.com/questions/36975310/how-to-hook-into-spark-events-on-register

However, when I pull in the User $user object in the Listeners constructor, all it contains is the tax code, even though if I debug from within the RegisterController.php file the full user object is passed to the event.

My Listener:

<?php

namespace App\Listeners\Auth;

use Illuminate\Support\Facades\Log;

// use App\Events\Laravel\Spark\Events\Auth\UserRegistered;
use Laravel\Spark\Events\Auth\UserRegistered;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\Contact;
use App\Message;
use App\User;

use Illuminate\Queue\SerializesModels;

class LinkExistingMessagesAndContacts
{
    use SerializesModels;

    /**
     * The user instance.
     *
     * @var \Illuminate\Contracts\Auth\Authenticatable
     */
    public $user;

    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(User $user)
    {
        Log::info('$user at the __construct level');
        Log::info($user);
        // Create the user object
        $this->user = $user;
    }

    /**
     * Handle the event.
     *
     * @param  UserRegistered  $event
     * @return void
     */
    public function handle(UserRegistered $event)
    {
        // Link the existing messages and contacts with this email
        // This makes sure that the users Inbox and Sent messages sections are
        // correctly filled on registration

        // TODO - wait to call this event until the email is validated.
        // Users could potentially sign up with emails that aren't theres to
        // gain unauthorised access to files and messages without this verification
        $user_id = $this->user->id;
        $email = $this->user->email;

        Log::info('$this->user at the LinkExistingMessagesAndContacts level'); // ($this->user));
        Log::info($this->user);

        // Link existing Messages
        Message::where("email", $email)->update(array('user_id' => $user_id));

        // Link existing Contact
        Contact::where("email", $email)->update(array('user_id' => $user_id));

        // TODO create historic Spark notifications for each inbox and sent item

    }
}

The debug output:

[2018-08-24 09:41:02] local.INFO: $user at register controller level
[2018-08-24 09:41:02] local.INFO: {"name":"Fron","email":"[email protected]","uri":"from","last_read_announcements_at":{"date":"2018-08-24 09:41:02.651979","timezone_type":3,"timezone":"UTC"},"trial_ends_at":"2018-09-03 09:41:02","updated_at":"2018-08-24 09:41:02","created_at":"2018-08-24 09:41:02","id":22,"tax_rate":0}
[2018-08-24 09:41:02] local.INFO: $user at the __construct level
[2018-08-24 09:41:02] local.INFO: {"tax_rate":0}
[2018-08-24 09:41:02] local.INFO: $this->user at the LinkExistingMessagesAndContacts level
[2018-08-24 09:41:02] local.INFO: {"tax_rate":0}