Member Since 2 Years Ago

Experience Points 50,840
Experience Level 11

4,160 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 505
Best Reply Awards 0
Best Reply
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement


    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement


    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

08 May
2 weeks ago

msassa left a reply on Chaining Jobs Doesn't Work For Me

I found the solution, you need to be explicit on the connection and queue

        (new CleanTenantCache(config('tenant.slug')))->onConnection('connection')->onQueue('queue'),
)->dispatch($request->ids, config('tenant.slug'));```
07 May
2 weeks ago

msassa started a new conversation Chaining Jobs Doesn't Work For Me

Hi everyone. I have this problem: i'm trying to chain some jobs, but doesn't seem to works or I'm not doing it the right way.

I have two jobs, and I call it this way:

                new CleanTenantCache(config('tenant.slug')),
        )->dispatch($request->ids, config('tenant.slug'));

I try this way too:

        MakeReplacements::dispatch($request->ids, config('tenant.slug'))->chain(
                new CleanTenantCache(config('tenant.slug')),

And only execute the first job MakeReplacements:

[2019-05-07 22:30:06][102] Processing: App\Jobs\MakeReplacements [2019-05-07 22:30:07][102] Processed: App\Jobs\MakeReplacements

Any idea, please.

04 Mar
2 months ago

msassa started a new conversation Create A Distributable Widget With VueJS In Laravel Backend

I have this backend made in Laravel, and I need through an api endpoint delivery some slider widget. Something like when I call the api respond something like:

<link href="" rel=stylesheet>
<vue-slider title="Example Slider"></vue-slider>
<script src="">

I found this excellent article and I think is what I'm looking for, but is make in vue-cli and I can't figure out how to adapt that in my laravel application.

If any one have some ideas, or a better way, thanks !!!

05 Feb
3 months ago

msassa started a new conversation Scout ToSearchableArray Doesn't Get Relations When Save From Nova

I have a model, with some relations. One is a belongsTo, and I'm adding some information from this relation to the toSearchableArray to indexed in Algolia. The main model is something like this:

class Car extends Model
    use Searchable;

    public function toSearchableArray()
        $searchableCar = array_only(
            ['id', 'title', 'url', 'active', 'vin', 'stock', 'bodyStyle', 'certifiedPreowned', 'color', 'diff', 'engine', 'kilometer', 'miles', 'make', 'model', 'price', 'year']

        $searchableCar['import'] = $this->import->name;

        return $searchableCar;

    public function import()
        return $this->belongsTo(Import::class);

And when I create a new model from Nova, I get an error saying ErrorException: Trying to get property 'name' of non-object like the relation doesn't exist yet.

I make a dump of the model in the saved event, and the import is null ?‍♂️

I fix this overwriting the method:

public function queueMakeSearchable($models)
        if ($models->isEmpty()) {


        if (!config('scout.queue')) {
            return $models->first()->searchableUsing()->update($models);

        dispatch((new MakeSearchable($models))

and manually loading the relation and it works ... but doesn't feel ok

Someone has deal with this problem?

04 Dec
5 months ago

msassa left a reply on Lock Button Action

@DEVOPS92 - Can you explain how you did this, please?

23 Jul
10 months ago

msassa started a new conversation Npm Run Watch - Exports.push Is Not A Function

It is happening to me that when I run npm run watch, the first compilation works fine, and then, when it detects a change in some vue file, and compiles automatically, in the browser I get these errors:

[Vue warn]: Error in beforeCreate hook: "TypeError: exports.push is not a function"
TypeError: exports.push is not a function

and that component no longer works. I have to stop the watch and run it again. Is impossible to work.

Any idea?

25 Jun
11 months ago
24 Jun
11 months ago

msassa started a new conversation Sending Emails Through Queue (horizon)

I have an issue sending emails through queue. Some times, is taking an old version (old text, old 'from address', everything). I already cleared the cache, restart horizon, and is radom. Any idea what can I do? Thanks

30 May
1 year ago

msassa started a new conversation Querying Related Models

I have the following problem: I need to select users who meet these conditions:

  • be active
  • belong to a particular group
  • belong to a specific category

And here are the two conditions that are giving me problems: 1 # that are within a radius of 200kms 2 # that the category is not overdue

For the 1 # each user has a related hasMany zone (Model Zone) where has lat and lng The 2 # each user has a relationship with the category, and that relationship has a start date and a duration

Today I am doing it in 2 parts, first I select all the users who fulfill the first conditions, And then I make a foreach checking the other two:

$filterSellerByCat = function ($q) use ($category)
    $q->where('category_id', '=', $category);

$sellers = User::with(['groups', 'zones', 'categories' => $filterSellerByCat])
            ->where('activated', '=', '1')
            ->whereHas('groups', function($q){
                    $q->where('id', '=', '3');
            ->whereHas('categories', $filterSellerByCat)

foreach ($sellers as $seller) {
    if($seller->zones[0]->distance()<200 and $seller->categories[0]->pivot->created_at > Carbon::now()->subMonths($seller->categories[0]->pivot->duration)){

In the Zone model, I created a distance method, which returns the distance from a given point and that zone:

public function distance()
    $sql = DB::raw("SELECT ((6378 * acos( cos( radians(POINT_LAT) ) * cos( radians( ) ) * cos( radians( users_zones.lng) - radians(POINT_LNG) ) + sin( radians(POINT_LAT) ) * sin( radians( ) ) ) ) ) AS distance FROM users_zones WHERE = {$this->id}");
    $distance = DB::select($sql);
    return $distance[0]->distance;

Obviously is not the right way because when you have 10000 users that meet the first condition, the foreach it will take too long and consume too much resources.

Someone could suggest me a better solution. I was trying to do everything in the first query ($sellers), but I have not succeeded. Thank you very much