benjackson

benjackson

Member Since 3 Years Ago

Experience Points
44,090
Total
Experience

910 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
429
Lessons
Completed
Best Reply Awards
1
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 9
44,090 XP
Nov
23
1 year ago
Nov
22
1 year ago
Activity icon

Started a new Conversation How To Push A Component Onto List Of Dynamic Components

I have a set of items which I'm displaying in a v-for list, and each list item is a component.

<component v-for="(item, index) in feed"
                        :is="item.type"
                        v-bind:data="item"
                        v-bind:list="list"
                        v-bind:index="index"
                        v-bind:key="item.id"></component>

Another component on the page has an event listener waiting for some user input. Is there a way I can take the data, push it into my array of items, and have it new up the vue component?

Something like:

this.feed.push(new Component(data) )

but in a Vuejs friendly way?

Jul
05
2 years ago
Activity icon

Replied to Setup The Website On First Time Access

If you add a boolean to your users table, called say 'hasCompletedSetup' you can check for this using middleware when a user logs in, and redirect them appropriately.

May
30
2 years ago
Activity icon

Started a new Conversation Email Unsubscribe Bug

@JeffreyWay Just thought I'd let you know I noticed when I'm unsubscribing from a discussion I had previously wanted to be notified about, I'm unsubscribed from the last in the list, rather than the one I selected.

Great work otherwise!

Activity icon

Replied to How To Post Data To A Protected Route Using Axios And Vue

You're not missing anything, normally with ajax you need to include a token, as you have with the api routes.

But with the default configuration that you get out of the box, you get the authenticated user added to every request, including ajax requests. It's added for you.

Test it and see ;-)

Activity icon

Replied to How To Post Data To A Protected Route Using Axios And Vue

If your web-based version of the app is using Laravel's views with vue, then the normal auth middleware will work. The authentication/session details are read from the cookie.

May
28
2 years ago
Activity icon

Started a new Conversation ReflectionException Repository Does Not Exist

Hey All,

This one has been bugging me for hours, I can't see what I'm missing. I have an interface

<?php 

namespace App\Contracts\Repositories;

interface UserFeedRespository
{
    public function getFeedForUser();
}

with its implementation

<?php

namespace App\Repositories;

use App\Contracts\Repositories\UserFeedRespository as UserFeedRespositoryContract;

class UserFeedRepository implements UserFeedRespositoryContract
{
    
    public function getFeedForUser()
    {
        
    }
}

I've added a binding to my AppServiceProvider:

$services = [
            'App\Contracts\Repositories\UserFeedRespository' => 'App\Repositories\UserFeedRepository',
        ];

        foreach ($services as $key => $value) {
            $this->app->bind($key, $value);
        }

and yet my controller is throwing a RefectionException Class App\Contracts\Repositories\UserFeedRepository does not exist.

<?php

namespace App\Http\Controllers;

use Auth;
use Illuminate\Http\Request;
use App\Contracts\Repositories\UserFeedRepository;

class HomeController extends Controller
{
    
    protected $feedRepository;

    public function __construct(UserFeedRepository $feedRepository)
    {
        $this->feedRepository = $feedRepository;
    }
    
    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $userCars = Auth::user()->vehicles()->get();
        
        return view('application.home', [
            'cars' => $userCars,
        ]);
    }

    public function getFeed(UserFeedRepositoryInterface $feedRepository)
    {
        $feed = $this->feedRepository->getFeedForUser();
        return $feed;
    }
}

I've tried composer's dump-autoload, but no luck. Can anyone see an obvious gotcha?

May
05
2 years ago
Activity icon

Started a new Conversation Sites Using Spark

Has anyone seen a Laravel Spark application being used in the wild? Just curious to see what people are using it to build!

Mar
21
2 years ago
Activity icon

Replied to Bootstrap Wizard

Take a look at the v-if on the "Submit" button. It should give you a clue!

Oct
17
3 years ago
Activity icon

Replied to Spark Multiple Billing Accounts

If your using stripe, you could dynamically set the API key when you make a charge, so the payment is directed to the right account.

Oct
11
3 years ago
Activity icon

Replied to Chaining Filters In Vue 2.0?

After some work I came to a solution that uses lodash and some method decorating to chain the filters. Here's my solution if anyone finds this useful:

    computed: {
        filteredJobs: function() {
            return this.filterIndustry(this.filterJobType(this.jobs))
        }
    },
    methods: {
             filterIndustry(jobs) {
                    if ($.isEmptyObject(this.industries)) {
                     return jobs
                    }

                if (!$.isEmptyObject(this.industries)) {
                    var self = this
                    
                    return _.filter(jobs, function(job) { 
                        return _.chain(job.industry)
                                .map('name')
                                .intersection(self.industries)
                                .size()
                                .gt(0)
                                .value() 
                    }); 
                }
            },
            filterJobType(jobs) {
                if ($.isEmptyObject(this.jobtype)) {
                    return jobs
                }

                if (!$.isEmptyObject(this.jobtype)) {
                    var self = this
                    return _.filter(jobs, function(job) {
                        return _.includes(self.jobtype, job.job_type)
                    })
                }
            },
Oct
06
3 years ago
Activity icon

Started a new Conversation Chaining Filters In Vue 2.0?

So according to the documentation, the filter feature is gone from vue 2.0, and the recommended approach would be computed properties. How would one go about chaining these? For example, I need to filter a set of records according to some user selections:

The Html:

<input type="checkbox" id="design" value="Design" v-model="industries">
<label for="design">Design</label>
<input type="checkbox" id="development" value="Development" v-model="industries">
<label for="development">Development</label>

{{ industries }}

<input type="checkbox" id="fulltime" value="fulltime" v-model="jobtype">
<label for="fulltime">Full Time</label>
<input type="checkbox" id="parttime" value="parttime" v-model="jobtype">
<label for="parttime">Part Time</label>

{{ jobtype }}

<tr v-for="job in filteredjobs">
<!-- ID -->
<td style="vertical-align: middle;">{{ job.id }}</td>
<!-- Title -->
<td style="vertical-align: middle;">{{ job.title }}</td>
<!-- Type -->
<td style="vertical-align: middle;">{{ job.job_type }}</td>
<td style="vertical-align: middle;">
    <div v-for="industry in job.industry">{{ industry.name }}</div>
</td>

and then vue:

data() {
    return {
        jobs: [],
        industries: [],
        jobtype: [],
    }
},

computed: {
    filteredJobs: function() {
    
    }
}

How do I filter Jobs by the chosen Industries and Jobtypes?

Oct
04
3 years ago
Activity icon

Replied to [Laravel 5.3] Error On Gulp Execution

@sailingdeveloper @lcf8381595 I hit the same issue as you guys. Turns out

 npm install buble-loader

fixes the issue. Source: https://github.com/laravel/elixir/issues/643.

Feb
23
3 years ago
Activity icon

Replied to Factory() Undefined

Ok, Nevermind! Not as fresh of an install as I thought. Required 5.1 or higher.

Activity icon

Started a new Conversation Factory() Undefined

Just trying to set up a couple of Model factories, this is on a fresh install. The factory() method is coming back undefined in my Seed file, and in Artisan Tinker too.

Here's the seeder:

use Illuminate\Database\Seeder;
use App\Models\Client;
use Faker\Provider;

class TestSeederTableSeeder extends Seeder
{
    public function run()
    {
        factory(Client::class, 10)->create();  
    }
}

I thought this was a global function?