jason

jason

Member Since 4 Years Ago

Experience Points 11,910
Experience Level 3

3,090 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 205
Lessons
Completed
Best Reply Awards 0
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.

28 Aug
2 years ago

jason left a reply on API Design/approach

Maybe your looking for something like l5-repository?

https://github.com/andersao/l5-repository

It allows you make requests to your API like this:

/author/5?include=books.publisher

This would return the author with id 5. A collection of all books by this author would be nested within the author data and keyed off of books. You can get additional related data with dot notation, in this case each book would have a publisher key with the value being publisher data.

I've had decent success with it for simple relational schema. Things can get a bit verbose on the front-end for complex relationships.

19 Oct
4 years ago

jason started a new conversation Best Practice For Handling "active" Menu Item In L5

I've been trying to wrap my head around how best to address marking a menu item as the current page (I'm using twitter bootstrap for front-end css). In L4 it is suggested to do something like this:

<li class="{{ Request::is('home') ? 'class="active"' : '' }}"><a href="{{URL::to('clients')}}">Home</a></li>

This doesn't seem to work in L5 though.

In attempt to stay DRY, I implemented a Nav helper class with the following method:

    public static function setActive($path, $request, $active = 'active')
    {
        return $request->is($path) ? $active : '';
    }

in my blade template I can do this:

<li class="{{\Webapp\Helpers\Nav::setActive('home', $request)}}">

but I will have to return the request in my controllers for every route that I want to enable for active menu navigation:

return view('home', compact('request'));

I swear I saw a laracast that touched on this subject but am having trouble finding it again.

Is returning the request in every controller method the best way to handle active menu items? Is there a more elegant solution?

11 Oct
4 years ago

jason left a reply on Laravel Elixir

@rocketjump -- not sure since I'm not familiar with that setup but I imagine you should be able to see notifications. Hopefully someone with more experience using osx mamp has an answer for you! :)

Also to note, official documentation isn't out yet and elixir was just announced yesterday (I think?) so my guess is that this sort of stuff will eventually get worked out.

jason left a reply on Laravel Elixir

@rocketjump -- I've been seeing gulp notify run out of the box. The notifications are going to my virtual machine though. I see the notifications because I'm currently running the VM in desktop mode. If you're running a VM via vagrant or headless, you probably wouldn't see any notifications.

Guest VM is a linux install, host is windows 8.1 where I use phpstorm.

jason left a reply on Laravel Elixir

@laloutre -- Not sure on the best practices for getting Elixir into an existing Laravel 5 project, I went ahead and started with a fresh Laravel 5 install which included all the necessary files.

That being said, you can try adding laravel/elixir to your composer.json file require section and then run composer update:

"laravel/elixir": "~1.0"

This won't add a package.json or Gulpfile.js so you'll need to manually add these files to the root of your project

https://github.com/laravel/laravel/blob/develop/package.json
https://github.com/laravel/laravel/blob/develop/Gulpfile.js

then run npm install.

One thing to note, I had some issues with the gulp-sass in the out-of-the-box package.json file. I hacked the code a bit to remove sass entirely as a dependency to get around it (I don't use sass).

You can try replacing gulp-sass with gulp-ruby-sass though (I believe I remember seeing a laracast about gulp-sass not working very well and @JeffreyWay addressed this by using gulp-ruby-sass instead). I'm not sure if that'll work, haven't tried it (since I don't use sass).

10 Oct
4 years ago

jason left a reply on Laravel Elixir

@codeatbusiness -- I am running a windows 8 host machine with linux on virtual box as the guest. I ran into some issues when I started bringing node.js and npm into my workflow.

If you get an error when you run this command from your VM:

ln -fs out/Release/node node ln: failed to create symbolic link `node': Read-only file system

Then this link might help solve your issue with npm in a VM running on a windows host:

http://ahtik.com/blog/fixing-your-virtualbox-shared-folder-symlink-error/

I followed it to the letter and it got me up and running with npm on the guest and windows as the host.