wyatt44

wyatt44

Member Since 1 Year Ago

Experience Points 28,960
Experience Level 6

1,040 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 285
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.

15 Jul
16 hours ago

wyatt44 left a reply on Testing Registration

Ah! Thats makes total sense, thank you!

12 Jul
3 days ago

wyatt44 left a reply on Adding Fields In Register.blade.php Doesn't Work

Did you update your migrations?

wyatt44 started a new conversation Testing Registration

Hello Everyone!

I am writing a test to check that invalid data posted to the register endpoint fails validation. I am trying to assert that the response is a redirect back to the register page.

But for some reason, the test keeps failing. It is saying that when I post invalid data, I am being redirected to / url.

Can anyone explain why this happening and is this the expected outcome?

Cheers!

public function test_a_user_cannot_register_with_invalid_email()
    {
        // Given we have invalid data
        $attr = [
            'first_name' => 'Wyatt',
            'last_name' => 'Castaneda',
            'middle_name' => 'test',
            'email' => '[email protected]',
            'password' => 'password',
            'password_confirmation' => 'password'
        ];

        // And we attempt to register
        $res = $this->post('/register', $attr);

        // We should redirected back to the
        $res->assertRedirect('/register');

        // And the database should have the new user
        $this->assertDatabaseMissing('users', ['email' => $attr['email']]);
    }
27 Jun
2 weeks ago

wyatt44 left a reply on File Uploads To Remote Service - Defer?

Thanks I'll check it out!

26 Jun
2 weeks ago

wyatt44 started a new conversation File Uploads To Remote Service - Defer?

Hello everyone!

I am working on an application that stores uploaded images on Cloudinary. (For the sake of this question basically just remote file storage)

When the user submits the form, I check if the request has any attachments, validate the files, etc. I then loop over the submitted files and upload them to the service.

My question is, is there a better way to do this?

By the time I am looping over the files, the files have been uploaded to the server... would it make sense to persist them to the local storage disk and dispatch jobs to upload them to the service? And then clean up the files after they have been uploaded?

Any tips would be greatly appreciated!

Cheers - Wyatt

25 Jun
2 weeks ago

wyatt44 left a reply on @foreach Loop Not Working? Laravel 5.8.24 (WAMP) W10

@zerodps have you set up the relationship on the reply model?

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Reply extends Model
{    
    public function thread()
    {
        return $this->belongsTo(Thread::class);
    }
}
28 May
1 month ago

wyatt44 left a reply on Help With Test

Can you post your migrations, and models? It looks like when you retrieve 'replies_count' it is currently returning as a string. You can potentially add a protected $casts array to your model and force the field to return as an integer.

Hope this helps!

24 Apr
2 months ago

wyatt44 left a reply on Laravel 5 Loading Wrong .env File

@SEADEV - Just spent two days attempting to debug this issue, caching it fixed everything! Thanks a million!

03 Feb
5 months ago

wyatt44 started a new conversation Large File Uploads In Nova

Hey all,

I am trying to upload large files via Nova, everything is working great except when you start uploading large files. The file is uploaded to storage in real time, and I can't seem to find a way to pass the uploading to a job.

I've tried to create an invoke-able class (as the docs suggest) and dispatch the job via that class, but was unable to get it working.

Anybody have any experience or suggestions?

Thank you!

18 Jan
5 months ago

wyatt44 left a reply on Avatar Not Persisting

Whenever I am having problems with uploaded assets, I check that I have linked the storage directory? Have you done this?

php artisan storage:link

Docs: https://laravel.com/docs/5.7/filesystem#configuration

01 Jan
6 months ago

wyatt44 started a new conversation Turbolinks & File Downloads

Happy News Years everyone!

Ran into an issue today while experimenting with Turbolinks and thought I would share for future searchers.

If using turbolinks and using links to prompt the user to download a file, make sure you disable turbolinks for that link.

<a href="url" class="block" data-turbolinks="false">Download</a>

Reference: https://github.com/turbolinks/turbolinks#disabling-turbolinks-on-specific-links

30 Nov
7 months ago

wyatt44 left a reply on Escaping {{ In VueJS

I went ahead and stripped down part of my component is placed it below.


<div v-for="link in filteredLinks">
        <li>
          <h2>
            <a :href="link.url" target="_blank">{{ link.title }}</a>
          </h2>
          <p>{{ link.description }}</p>
        </li>
      </div>

filteredLinks is an array of arrays. It is breaking when the link.description contains the following:

<form id="logout-form" :action="href" method="POST" style="display: none;">
        {{ csrf_field() }}
</form>

In the console it is giving me a TypeError: csrf_field is not a function error. And stopping Vue from rendering the component.

Hope this helps clear up the question?

wyatt44 left a reply on Escaping {{ In VueJS

I'm tried a few combinations of v-pre and v-html, the main problem is I won't always know what the content is that I am trying to escape (It is user generated data) other than that it could have the {{'s in it.

Any other suggestions?

wyatt44 left a reply on Escape {{ }} In Vue (2.0)

@VMITCHELL85 - Sorry,

Should have expanded a bit, I am displaying data from the database, that may or may not have {{'s in the content. For example I have a bit of content that looks like {{ my_function }}

So I want the data to be outputted as normal, but the handlebars are breaking it. Should I be escaping these values before it is input into the database?

Thanks for the help!

wyatt44 left a reply on Escape {{ }} In Vue (2.0)

@MATT_PANTON - Hey Matt,

Long shot, but any updates on how to best handle database content that may have {{'s in it?

Thanks!

wyatt44 started a new conversation Escaping {{ In VueJS

Happy Friday Everyone!

I am having escaping {{ in VueJS. I an saving dynamic data to the database and displaying it view Vue components.

Anytime the content has example code for Vue where the double handlebars are used, when I try to display the content, it breaks.

Any help would be greatly appreciated!

29 Oct
8 months ago

wyatt44 started a new conversation Multiple Modals Best Practice

Hey everyone just wanting to get some opinions,

I have a collection of list items with buttons to open modals to edit the data, the modal is the same for every item only the specific information inside changes. Each item is rendered as a Vue component.

Each modal contains a form that displays the items data and submits a post request with the item id as a field. My question is how to best handle modals for a bunch of items, should I be:

  1. rendering a modal for each item
  2. rendering a single modal and passing item specific details on click

Any advice would be greatly appreciated! - Happy Coding