codedungeon

codedungeon

Member Since 5 Years Ago

Huntington Beach, CA USA

Experience Points 68,620
Experience Level 14

1,380 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 1071
Lessons
Completed
Best Reply Awards 4
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 Aug
1 year ago

codedungeon left a reply on How To Construct Eloquent Query From This SQL Statement

Got it, that is just where I was headed (flatten, that only returns values, the collect method is indeed the final piece) in the docs :-)

codedungeon left a reply on How To Construct Eloquent Query From This SQL Statement

So, yes the following does indeed return required data (getting closer) but I still need to flatten the result object

App\Batting::whereId(72548)->with('player:playerID,nameFirst,nameLast')->first();

codedungeon left a reply on How To Construct Eloquent Query From This SQL Statement

AFAIK, the relationship is correct.

use App\Player;

class Batting extends Model
{
    protected $guarded = ['id'];

    public function player()
    {
        return $this->hasOne(Player::class, 'playerID', 'playerID');
    }
}

codedungeon left a reply on How To Construct Eloquent Query From This SQL Statement

OK, I have it sort of working...

App\Batting::whereId(72548)->with('player:playerID,players.nameFirst,players.nameLast')->first();

returns the correct columns, but the players table is a nested object of batting, need a flattened) object (and only need specific columns from batting table)

Currently

=> App\Batting {#2924
     id: 72548,
     playerID: "troutmi01",
     yearID: 2015,
     stint: 1,
....
     player: App\Player {#2978
       playerID: "troutmi01",
       nameFirst: "Mike",
       nameLast: "Trout",
     },
   }

codedungeon left a reply on How To Construct Eloquent Query From This SQL Statement

I have been down this road, and not having much success. I have tried the following, trying your version:

>>> App\Batting::whereId(72548)->with('player:id,players.firstName,players.lastName')->get();
Illuminate/Database/QueryException with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'players.firstName' in 'field list' (SQL: select `id`, `players`.`firstName`, `players`.`lastName` from `players` where `players`.`playerID` in (troutmi01))'
>>>

codedungeon started a new conversation How To Construct Eloquent Query From This SQL Statement

Hey Gang

I am hitting my head against the wall trying to figure out how to convert this simple SQL statement to a relevant Eloquent query

SELECT 
    players.nameFirst, 
    players.nameLast, 
    batting.* 
FROM batting 
INNER JOIN players ON batting.playerID = players.playerID 
WHERE batting.id = 72548;

I can get the data I want using

App\Batting::whereId(72548)->with('player')->get();

But can't get it to return a single (flat object) with just the nameFirst and nameLast fields from the players table.

13 Aug
2 years ago

codedungeon left a reply on PyroCMS 3 (Pre-Order Version) Vs Ocober CMS

So, it has been a year or so since these posts were constructed. What is your impression of PyroCMS since that time? I am wavering back and forth between using Pyro vs WordPress.

Has the documentation improved? How about customization via themes?

@karaoak @Will @RyanThePyro

15 Mar
2 years ago

codedungeon left a reply on Keep Getting "404 Not Found" Error With Forge

Did you ever get this situation resolved. I am experiencing the same thing (but in my case, it is a simple laravel new app) I am trying to connect to site using IP address (do not have domain yet)

15 Jun
4 years ago

codedungeon left a reply on Windows Terminal (similar To ITerm, Etc)

Thanks for the input! Just making sure I am not missing out on the tool all the cool kids are using :-)

codedungeon started a new conversation Windows Terminal (similar To ITerm, Etc)

Hey Windows Heads

What terminal tool are you all using? Been a Mac guy my whole life and want to find something similar to iTerm?

Currently using cmder but still looking for the right tool?

Suggestions?

06 Apr
4 years ago

codedungeon left a reply on Laravel 5 And Seeds

@bashy Ya kinda figured that when I couldn't find it will google. I wound up finding one to use so issue 'resolved'

28 Mar
4 years ago

codedungeon left a reply on Laravel 5 And Seeds

@canfiax I have scoured the web looking for Athliit\Colors and Athliit\ProgressBar and cant find anything? Not in packagist? Google no joy?

codedungeon left a reply on Laravel 5 And Seeds

@canfiax What color class are you using to colorize messages?

17 Feb
4 years ago

codedungeon left a reply on Behat Laravel 5 Extension

@JeffreyWay Should you want a 'broken' archive to review the extension, I would be most happy to provide it. This is driving me nuts.

codedungeon left a reply on Behat Laravel 5 Extension

@JeffreyWay et al

I am finding that using this approach with Behat 3 and the Laravel Extension quite flaky.

For example, using the steps outlined here https://github.com/tmalecki/Behat-Laravel-Extension-Example-App work great THE FIRST TIME.

However, if I have to do a composer dump-autoload for some reason (in my case, it is required to get PHPUnit working) after that process has completed, Behat breaks producing the infamous ''Maximum function nesting level of '100' reached'

Scenario: Home Page # features/example.feature:6 exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Maximum function nesting level of '100' reached, aborting!' in /Users/mikee/Documents/Projects/rangladex5/vendor/composer/ClassLoader.php:347 Stack trace: #0 /Users/mikee/Documents/Projects/rangladex5/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(116): Illuminate\Foundation\Bootstrap\HandleExceptions->fatalExceptionFromError(Array) #1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown() #2 {main}

I have not found a solution to FIXING this issue after issuing a composer dump-autload, all behat things are effectively broken?

Anybody have a cure by chance?

05 Dec
4 years ago

codedungeon left a reply on Homestead Is Very Slow On Yosemite

@freekmurze Any chance the issue was related to Spotlight indexing drives after install. I had a similar issue with other VM (from Vaprobash) right after Yosemite install, but all was cool after the Spotlight index completed.

04 Dec
4 years ago

codedungeon left a reply on What Does Forge Actually Install?

@jacob It used to install Node, but that option was removed (temporarily) as it was causing some issues. However, it will be returned in the very near future.

codedungeon left a reply on Laravel Roadmap And LTS (Long Term Support) , Is There Any?

@alexcallard That is very interesting (and surprising). I think this is the negative side affect of working with a framework that is basically a one man show...

codedungeon started a new conversation Homestead 1 -> 2 ... Any Issues?

I have been holding of on upgrading to Homestead 2 (if for any other reason that v1 is working just fine)

Curious if you all have run into any issues?

26 Nov
4 years ago

codedungeon left a reply on Php Artisan Serve Inexistent

Yes indeed the server command has been removed from latest Artisan, but there is a very simple fix.

You can use:

php -S localhost:8000 -t public/

Or, create an alias

alias server="php -S localhost:8000 -t public/"  

You can also change the port to something different as to not potentially collide with any Homestead servers

alias server="php -S localhost:8080 -t public/"

codedungeon left a reply on L4 Relationship Issue

@bashy That is what prompted me to look at alternatives... All is well in the world with my alternate solution ;-)

codedungeon left a reply on L4 Relationship Issue

So, I changed the code to

$contact = Contact::whereId($id)->with('actions')->get();

and I now get the results I am looking for, however, still puzzled why above code didnt work?

codedungeon started a new conversation L4 Relationship Issue

Having an interesting issue and not sure how to solve

public function actions($id)
{
    $contact = Contact::find($id)->with('actions')->get();
    return $contact;
}

This code returns ALL Contacts (with their associated Actions).

When in fact, it SHOULD be return just the desired Contact record with the associated ID.

If I scale this query back to just

$contact = Contact::find($id);

then I do get the single contact record (but it doesnt have the actions)?

08 Nov
4 years ago

codedungeon left a reply on Whoops! Removed From Laravel 5?

@pgnonick Tried you solution and it worked perfectly... Now we will see how long this lasts before a future update breaks it ;-)

codedungeon left a reply on Whoops! Removed From Laravel 5?

@psmail There has to be a good reason? Maybe it will return when it goes final since the framework is still in flux, thus so is implementation of Whoops....

I am just going to wait it out... The current Sympony error report is more than adequate at the moment.

05 Nov
4 years ago

codedungeon left a reply on Whoops! Removed From Laravel 5?

@bart seems this no longer works with latest Laravel 5 install (installed today and Whoops no long works). Any chance you have tried with latest build? Does it work for you?

codedungeon left a reply on Where Are You All From?

Huntington Beach, CA USA

01 Nov
4 years ago

codedungeon left a reply on L5: Whoops Integration

@opb been told that the artisan stuff is disabled at the moment as they are reworking internals, but it will be back on at some point.

As @bart says, the missing ErrorServiceProvider is not a big deal, but I can see why it seems logical that it should be there when final released.

31 Oct
4 years ago

codedungeon left a reply on L5: Whoops Integration

@isimmons OK, all is good now.... Just had to reinstall Whoops package and everything is now "broken" correctly ;-)

codedungeon left a reply on L5: Whoops Integration

@isimmons I am going to start over and see what happens. After I added the Service Provider, everything broke (artisan broke and all URLs fail)

codedungeon left a reply on L5: Whoops Integration

@isimmons Ah I see now... But in my case, I can't seem to get it to fire when I force an error. Put a 'dd' in the run method and it doesn't catch it?

Did I perhaps miss a step?

Also, would like to talk to you about moving from routes.php to annotation approach?

codedungeon left a reply on L5: Whoops Integration

@isimmions Care to share your method, we might have some different app.php code ;-)

codedungeon left a reply on L5: Whoops Integration

@bart Well, while I like the implementation, it doesn't seem to work (the ErrorServiceProvider.boot method is never called) Followed all your steps but doesn't work.

@isimmons

Seems like a pretty easy implementation as well. Will go this route second if I can't get ErrorServiceProvider approach to work.

codedungeon left a reply on Laravel 5: New Installation Won't Serve - 500 Response

Thanks.... Been using a basic php server in interim

codedungeon started a new conversation L5: Whoops Integration

Since the powers that be have removed Whoops package from L5, I am trying to get it restored. have any of you Artisans gotten it working?

codedungeon left a reply on Laravel 5: New Installation Won't Serve - 500 Response

I have had success with previous builds, seems to have cropped up in a recent update. Will pass this issue along to the powers that be and see what happens.

30 Oct
4 years ago

codedungeon left a reply on Laravel 5: New Installation Won't Serve - 500 Response

Ya, I dont even get that far (no errors are reported at all) I only get a 500 in the debugger.

And I am really wondering why they removed Whoops, so much better than the drab that is xDebug error output.

codedungeon started a new conversation Laravel 5: New Installation Won't Serve - 500 Response

Using a brand new installation of L5, when accessing server it responds win 500 response code. I am serving using artisan serve --port=8080

codedungeon left a reply on Laravel 5: CORS Headers With Filters

@jonas @chirag what was required to get it working (what is magic code). I am experiencing a similar issue

23 Oct
4 years ago

codedungeon left a reply on Framework For Building An API

@clarkeash I say use ASP.NET or Java

20 Oct
4 years ago

codedungeon left a reply on GUIDE Laravel 5 And Phpspec Setup Instructions

@klorox So, have you tried to put your source code somewhere else (ie in a new directory under 'app') and get it to work? I can ONLY make this work when my code is "loose" at the 'app' directory level. Any other place and phpspec cant find it

  • I have tried namespacing correctly
  • I have definitely composer dump many times
19 Oct
4 years ago

codedungeon left a reply on Laracasts On ITunes

$1 per lesson is an insult to Jeffrey! Pay the $9 and consider yourself lucky that you are able to get quality videos etc for so cheap.

I am honestly surprised he doesn't charge more.

codedungeon left a reply on What About A Section Dedicated To Client Side Scripting? Javascript Framework, Like Angular?

Let's not forgot the core concepts of this site. It is LARAVEL centic, no JavaScript. There are a plethora of quality AngularJS sites and reosurces, no need to have Laracasts waver from its core.

I think Laracasts is by far the best resource available for Laravel, I say keep it that way! I seem to recall the words "focus, focus, focus" referring to the L5 project.

IMO, this site needs to stay to its core values and continue to provide the ultimate in Laravel tutorials, etc.

09 Oct
4 years ago

codedungeon left a reply on Problem Creating New Laravel 5 Project ....

@sitesense Thanks for this tip, that was the cause. Guessing the powers that be should do something about that issue :-)

08 Oct
4 years ago

codedungeon left a reply on Problem Creating New Laravel 5 Project ....

Well isn't that special!!! Not that I don't believe you at all, sure it is known. Do you know of any other feedback or workaround. Sure puts a damper on the new L5 series Jeffrey is doing.

Then again, can't expect it to be working as it isn't even in beta form (but it will be released in less than a month so that seems weird that it's not in beta at this point)

codedungeon left a reply on About Incremental API

It would seem to me that waiting for 4.3 (now 5.x) to complete this would be more confusing since the rest of the code is in 4.2 and upgrading to 5.x will be a more labor intensive process.

Furthermore, it would seem this series (and most other series in the archives) are going to need a recast as v4 -> v5 is not a simple update.

codedungeon started a new conversation Problem Creating New Laravel 5 Project ....

Trying to create a new project with composer, but after install receive an error and artisan is not working? Anybody seen this happen? I have tried several times and always get the same results.

$ composer create-project laravel/laravel myApp5 dev-develop

This is a screenie of the error I am receiving after the install process (assuming it is because artisan is not working)

http://d.pr/i/1jFp9