itsfg

itsfg

Member Since 2 Years Ago

Experience Points
12,490
Total
Experience

2,510 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
107
Lessons
Completed
Best Reply Awards
2
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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 3
12,490 XP
Feb
17
3 months ago
Activity icon

Replied to Model Event “deleted” Does Not Return All Pivot Attributes

If that doesn't work, maybe Laravel doesn't go check the content of the database to delete something. That could make sense. If that's the case, maybe you should check the "deleting" event (if that exists) where you can maybe still access the database record to store whatever you want.

Activity icon

Replied to Model Event “deleted” Does Not Return All Pivot Attributes

Hi @pmusa

Have you tried adding withPivot() to your users() relationship on the Role model ?

public function users(): MorphToMany
{
        return $this
        ->morphedByMany(...)
        ->using(\App\Pivot\RolePivot::class)
        ->withTimestamps()
        ->withPivot([
            'list_here',
            'the_pivot_table_attributes',
            'you_want_to_get_back_when',
            'calling_the_relationship'
    ]);
}
Activity icon

Replied to How Can I Add And Calculate The Sum Where The Value Is In Another Table

Hi @vincentsanity

For the first part of your problem you can do this :

//$answers taken from your first query posted
$answers->sum('value')

This sum() is a Collection method, the sum is made in PHP after getting your results back from the database.

Activity icon

Replied to Nested Relationship With GroupBy And Count

Hi @maan56

I'm not sure to see where your problem is. You have on event, you can do a loop on

$event->company->persons

to group or count whatever you want right ?

Feb
03
4 months ago
Activity icon

Replied to Invalid Route Action

Thanks @sti3bas that was the issue. The fact that it worked before wasn't very logic, I guess the Laravel team fixed that.

Jan
24
4 months ago
Activity icon

Started a new Conversation Invalid Route Action

Hi everyone,

I'm trying to update an application currently in Laravel 5.5 to Laravel 6. I'm going one version at a time. No problem to update to 5.6. But after having updated to Laravel 5.7, I get an error :

In RouteAction.php line 89:
Invalid route action: [Attachments\GetAttachmentController].

This controller contains only one __invoke() method. This is why I don't have to give the method name in my route. What could possibly be wrong ? Can it be because of the Route::group or Route::prefix() ? Or some cache (I don't cache the routes of the application, but...) ?

This is my route definition in web.php :

Route::group(['middleware' => 'web', 'namespace' => '\Attachments'], function () {

    Route::prefix('admin')->group(function () {

        Route::get('/attachment/{attachment_id}', 'GetAttachmentController')->name('get_attachment');
        // ...
    });
});

Some clues anyone ?

Thank you all

Dec
20
5 months ago
Activity icon

Replied to Too Many Columns / Fields In Table, Ideas On How To Resolve?

Why not have :


id
user_id

connection_number //your 1, 2, 3 ...
connection_settings1
connection_settings2
connection_settings3

And if a user uses 2 connections you have 2 rows associated to this user ?

You may have maybe different number of settings for each connection, so maybe some fields will remain always null.

Maybe it's not a problem.

Maybe it is, then @martal solution is great.

And you could also do a polymorphic relationship between the users and the many different connections to get a normalized collection of all connections of a user.

Activity icon

Awarded Best Reply on Tinymce Image Upload

Hi @snipesnipes

I see you use Route::get('/upload' , '[email protected]');

I guess it should be a post route ? Route::post('/upload' , '[email protected]');

Activity icon

Replied to Tinymce Image Upload

Hi @snipesnipes

I see you use Route::get('/upload' , '[email protected]');

I guess it should be a post route ? Route::post('/upload' , '[email protected]');

Activity icon

Replied to Vue - Lazy Loading Components

Hi @muellernm

I know I had to create a .babelrc file at the root of my Laravel project to make dynamic import work. This is what I have inside the file :

{
    "plugins" : ["@babel/plugin-syntax-dynamic-import"]
}

This babel plugin will be added to your dependencies in the package.json file.

I also don't have this mix.webpackConfig(...) part in my webpack.mix file. I just use comments in the imports of the dynamic components if I want to name my chunks :

const MyComponent = () => import(/* webpackChunkName:"name-of-your-js-file" */ './components/MyComponent.vue');