dmattingley

dmattingley

Member Since 5 Years Ago

Experience Points 15,590
Experience Level 4

4,410 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 231
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.

02 Sep
1 year ago

dmattingley left a reply on Laravel Not Returning First Record

Turns out the original developer has this little gem injecting into each query.

$query->where($this->table . '.id', '!=', 1); ... That was a wasted day.

dmattingley left a reply on Laravel Not Returning First Record

I've been having a play, ::all() seems to be generating this sql

  • select * from "clients" where "clients"."id" != '1' and "clients"."deleted_at" is null which explains why its ignoring the first.

If I try something more like $clients = \Client::where('1','1'); it still appends "clients"."id" != '1' to the query:

  • select count(*) as aggregate from "clients" where "clients"."id" != '1' and "1" = '1' and "clients"."deleted_at" is null
01 Sep
1 year ago

dmattingley left a reply on Laravel Not Returning First Record

This is happening throughout the app. So its not just on my factory->create methods, they were just an easy example.

dmattingley started a new conversation Laravel Not Returning First Record

Laravel isn't recognising the first record of anything I add.. ie

When I add a record to the database - $client = factory(\Client::class)->create(); then look at

  • dd($client); it has an id of 1 but if i try and any related records it says it doesn't exist;
  • dd(\Client::all()) returns an empty collection
  • \DB::table('clients')->get() shows the record (and deleted_at is null)

If i add a second record to the database with the factory above then

  • dd($client) works as expected with an id of 2
  • dd(\Client::all()) returns only the second collection
  • \DB::table('clients')->get() shows both records as expected.

This is the same over all models, not just \Client

07 Aug
2 years ago

dmattingley left a reply on Reverse A GroupBy Statement?

Your current setup will only select subjects that are linked to a stack.

If you are wanting subjects that aren't linked to a stack you will need to reverse the whole select statement so you're selecting the $subjects = Subject::with('stack') and then do your two loops

@foreach ($subjects as $subject)
    <div>
    <h3>{{ $subject->name }}</h3>
    @foreach ($subject->stacks as $stack)
        

Then you can check @if ($subject->stacks()->count() > 0) or so and display a No stacks currently listed message.

25 Nov
2 years ago

dmattingley left a reply on Redirect To A Page Defined In Route

If you change your route to a named route, ie:

 Route::get('/s/{query}', '[email protected]')->name('search');

https://laravel.com/docs/5.3/routing#named-routes

you can then call it with the route helper

route('search',['query' => $aQuery]);

https://laravel.com/docs/5.3/responses#redirecting-named-routes

dmattingley left a reply on Notification In Lumen 5.3

You can pull in the notification library used in laravel 5.3 by putting

 "illuminate/notifications": "5.3.*"

into your composer.json then running composer update to pull in the notification libraries.

You will also need to add

$app->register(Illuminate\Notifications\NotificationServiceProvider::class);

to your bootstrap/app.php

To use slack notifications you'll also need guzzle in your composer.json

"guzzlehttp/guzzle": "6.0.*"

Tested on lumen 5.3

16 Nov
2 years ago

dmattingley left a reply on Vultr SSD Cloud Hosting

Hey psmail, did you stick with Vultr for Australian hosting? are they any good?

24 Oct
2 years ago

dmattingley left a reply on Laravel Echo Issue: Uncaught TypeError: Next Is Not A Function

Did you have any luck solving this ?

05 Jul
3 years ago

dmattingley left a reply on SSO With Azure AD

Did you have any luck with this? I've just started looking into this myself and would appreciate any tips!