jjmeyer

jjmeyer

Member Since 5 Years Ago

Experience Points
19,265
Total
Experience

735 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
243
Lessons
Completed
Best Reply Awards
0
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 4
19,265 XP
Sep
13
1 month ago
Activity icon

Awarded Best Reply on What Is The Laravel 8 Replacement For Factory->raw()

The missing raw() method was added back into laravel/framework in this commit

Works fine in the latest minor release.

Activity icon

Replied to What Is The Laravel 8 Replacement For Factory->raw()

The missing raw() method was added back into laravel/framework in this commit

Works fine in the latest minor release.

Sep
12
1 month ago
Activity icon

Replied to Laravel Jetstream To An Existing Laravel

I successfully completed an upgrade to v8 and Jetstream installation on an existing v7 installation. Small git commits, diffing and iterative changes made the process relatively painless.

This is what worked for me:

  • I first straight upgraded to v8.
  • I decided to move the User model into the Models/ folder per the new v8 default (this is optional, and simply a choice for future convenience)
  • I then decided to refactor all tests to use the v8-style factories including moving seeders into the V8 folder naming structure - this task took the majority of time. (it's however possible to continue using legacy factories when installing the package)

With the v8 upgrade done, tested and committed (a clean git working directory) I then installed the jetstream package.

It is at this juncture that being able to track changes with some sort of version control like git becomes very helpful, I'd even say, crucial.

Jetstream install (as noted in the documentation) assumes being installed into a new Laravel installation. It therefore overwrites and obliterates various config files, including webpack and tailwind, the user model, and a couple of providers, amongst others.

In total, roughly 50 files were added and changed. It took me a couple of minutes to re-integrate my original changes (mainly in webpack, tailwind config, routes/web.php, Models/User.php etc.

Re-ran migrations, seeders, npm build and were back up and running, fully updated, installed and tested within about an hour.

YMMV off-course, but I found that it is possible and relatively straight-forward to Install JetStream, starting from a V7 app, if the complexity, maturity and version history of your app precludes an alternative implementation path.

Sep
10
1 month ago
Activity icon

Replied to What Is The Laravel 8 Replacement For Factory->raw()

I resolved it by adding a raw() method to the factory, calling the Factory getRawAttributes implicitly. It is a resolution for the immediate issue, but somehow I do not feel it is the correct solution, since getRawAttributes exists in Database/Eloquent/Factories/Factory.php, but seems, upon first glance to throw an exception in __call(), rather than being called.

<?php

namespace Database\Factories\Profile;

use App\Profile\Profile;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

class ProfileFactory extends Factory
{

...

    protected $model = Profile::class;

    public function definition()
...
    }

    // resolves the call to raw() for now, but may not be the final solution
    public function raw()
    {
        return $this->getRawAttributes(null);
    }
}
Activity icon

Replied to What Is The Laravel 8 Replacement For Factory->raw()

I adopted with the legacy-factories approach initially to ensure a phased upgrade. However it is in migrating to the V8 factories-approach that I'm somewhat stumped in finding a way to return an array of Model attributes from the factory instead of the Model instance.

I'm working on the assumption that since @JeffreyWay in the videos series frequently recommended using the raw() method as a way to declutter tests, this may be relative common factory migration issue.

If anyone has encountered and managed to resolve or, I'd appreciate your share.

Activity icon

Started a new Conversation What Is The Laravel 8 Replacement For Factory->raw()

In upgrading from Laravel 7 to Laravel 8, I changed out the legacy factory approach for the new factory. It was relatively painless however;

Previously I used

$attributes = factory(Profile::class)->raw();

to return an array bag of model attributes from the factory. It appears the raw() method is not supported in the redesigned factories.

$attributes = Profile::factory()->raw();


Call to undefined method Database\Factories\Profile\ProfileFactory::raw()


How would I return an array of fields from the factory as raw() did previously, instead of an instance of the Model as make() or create() does?