joshuafranks

joshuafranks

Member Since 1 Year Ago

London

Software Engineer at Mettle

Experience Points 10,130
Experience Level 3

4,870 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 93
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.

10 Nov
8 months ago

joshuafranks started a new conversation [Dusk] Test Passes When Ran Individually But Fails When Ran As Part Of A Suite.

I've got two tests that, when ran individually, pass. If I run the entire dusk test suite, I get a failure on my second test:

Error:

ReflectionException: Class env does not exist

/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Container/Container.php:779
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Container/Container.php:658
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Container/Container.php:609
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:733
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Container/Container.php:1222
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:497
/home/vagrant/code/portfoliyo/app/Providers/TelescopeServiceProvider.php:22
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php:60
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php:60
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Support/Collection.php:455
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php:61
/home/vagrant/code/portfoliyo/vendor/laravel/telescope/src/Telescope.php:222
/home/vagrant/code/portfoliyo/vendor/laravel/telescope/src/Telescope.php:195
/home/vagrant/code/portfoliyo/vendor/laravel/telescope/src/Telescope.php:225
/home/vagrant/code/portfoliyo/vendor/laravel/telescope/src/Telescope.php:249
/home/vagrant/code/portfoliyo/vendor/laravel/telescope/src/Watchers/CacheWatcher.php:63
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:360
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:209
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:497
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:103
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:323
/home/vagrant/code/portfoliyo/vendor/laravel/telescope/src/Watchers/DumpWatcher.php:43
/home/vagrant/code/portfoliyo/vendor/laravel/telescope/src/RegistersWatchers.php:48
/home/vagrant/code/portfoliyo/vendor/laravel/telescope/src/Telescope.php:110
/home/vagrant/code/portfoliyo/vendor/laravel/telescope/src/TelescopeServiceProvider.php:27
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Container/Container.php:572
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:793
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:776
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:777
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:206
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:297
/home/vagrant/code/portfoliyo/tests/CreatesApplication.php:18
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:91
/home/vagrant/code/portfoliyo/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:68
/home/vagrant/code/portfoliyo/vendor/laravel/dusk/src/TestCase.php:23```

*Test*: 

/** @test */ function the_editor_preview_updates_when_inputs_are_altered() { $template = factory(Template::class)->create([ 'content' => '{{ heading }} {{ subheading }} {{ body }}', ]);

    $portfolio = factory(Portfolio::class)->create([
        'template_id' => $template->id,
        'content' => null,
    ]);

    $contentVariables = $template->content_variables;

    $this->browse(function (Browser $browser) use ($portfolio, $contentVariables)
    {
        $browser->visit(route('portfolios.content.create', $portfolio->id))
            ->assertSee('Design Portfolio')
            ->assertSee('{{ heading }}')
            ->assertSee('{{ subheading }}')
            ->assertSee('{{ body }}')
            ->type('template_content[heading]', 'My Heading')
            ->assertSee('My Heading')
            ->type('template_content[subheading]', 'My Subheading')
            ->assertSee('My Subheading')
            ->type('template_content[body]', 'My Body')
            ->assertSee('My Body');
    });
}
14 Jun
1 year ago

joshuafranks left a reply on Does RefreshDatabase Rollback Changes After Each Test Of At The End Of All

RefreshDatabase resets your database after each test to eliminate the risk of data interference.

You can read more about the RefreshDatabase trait in the documentation.

https://laravel.com/docs/5.6/database-testing

joshuafranks left a reply on Convert A String To A Integer

If you're wanting to convert it to a Carbon instance, you can just use Carbon's parse() method:

Carbon::parse("2014-10-20")

That will return a Carbon instance of the date provided.

03 Jun
1 year ago

joshuafranks left a reply on Laravel 5 Ajax 404 Not Found Error

The issue he is having isn't with the read method; the screenshot shows that he's posting to the update() method. I'm going to assume that the function is within a Blade template file, in which case - this line is probably what's causing your issue.

$.post("{{ URL('peoples/"+id+"/update') }}"

Try it without the URL helper.

$.post("peoples/" + id + "/update")

joshuafranks left a reply on Laravel 5 Ajax 404 Not Found Error

What file is that load function in?

joshuafranks left a reply on Laravel 5 Ajax 404 Not Found Error

You haven't shown us a read() method in your PeopleController.

joshuafranks left a reply on $this->user_id Not Executing

If you're not sure how to access the index() method, then you're really misunderstanding what a Controller is and the purpose it serves in your application. I recommend reading through the Laravel documentation to get a better understanding of what you should be doing.

https://laravel.com/docs/5.6/controllers

30 May
1 year ago

joshuafranks left a reply on Mailtrap.io Error

Try running php artisan config:cache.

29 May
1 year ago

joshuafranks left a reply on Why Do We Need Other Package To Test?

Test Driven Development is far more reliable and effective than manual testing. By having a comprehensive test suite, you give yourself the peace of mind that everything is covered. You can write all sorts of tests that cover a number of eventualities and reliably assert that your code works.

This is especially useful when refactoring your code. When you make changes, you can run your tests and ensure that everything still works as you expect. Even subtle changes could have an adverse affect on other parts of your application and it's easy for things to go unnoticed.

The authentication that comes out of the box with Laravel is already reliable, but as your application grows and you start writing your own features - tests are incredibly useful. It's a pretty broad subject, but there are plenty of resources out there that can help you learn.

Another advantage, of course, is that you can drive out the core features of your application without any front-end work at all.

21 May
1 year ago

joshuafranks left a reply on Enterprise Applications

Give this episode of The Laravel Podcast a listen. Taylor, Jeff and Matt Stauffer talk about Laravel "enterprise" applications and some common misconception associated with them.

http://www.laravelpodcast.com/5fc5650b

17 May
1 year ago

joshuafranks left a reply on Include Custom CSS

This may not help at all, but perhaps try clearing your application cache (php artisan cache:clear) and restarting your server.

16 May
1 year ago

joshuafranks left a reply on Laravel Authorization For Approving A Thread

@rvp04 so you never used php artisan make:auth?

joshuafranks left a reply on Laravel Authorization For Approving A Thread

Are you using the authentication services that come out of the box with Laravel?

04 Apr
1 year ago

joshuafranks left a reply on Laravel Authentication Not Persisting

Are you sure you don't accidently have Auth::logout() anywhere in your views?

03 Dec
1 year ago

joshuafranks left a reply on Sort V-for List With Calculated Field

How are you fetching the data in the first place?