SeebeckZachary

Software Engineer at Newtech Dealer Services

Member Since 1 Year Ago

Essexville, MI

Experience Points
140
Total
Experience

4,860 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
0
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.

  • Community Pillar

    Earned once your experience points ranks in the top 10 of all Laracasts users.

Level 1
140 XP
Oct
21
2 months ago
Activity icon

Replied to Using Laravel Mix With Javascript.

Hey that worked! Thank you so much!

Activity icon

Started a new Conversation Using Laravel Mix With Javascript.

So I'm working on a project that has quite a bit of Javascript. We're wanting to put the Javascript through Laravel Mix for it to be able to minify it as well as use NPM modules in it. We've moved the files over into the resources directory, and added them into the webpack.mix.js. But after running npm run dev I can no longer access the functions that were in those Javascript files in the HTML, developer console, or from other JS files.

Here's what my webpack file looks like currently.

mix.babel('resources/js/app.js', 'public/js/app.js')
   .babel('resources/js/mobile/global.js', 'public/js/mobile/global.js')
   .babel('resources/js/lw-sortable.js', 'public/js/lw-sortable.js');

mix.sass('resources/sass/app.scss', 'public/css/app.css')
    .sass('resources/sass/darkmode.scss', 'public/css/darkmode.css')
    .sass('resources/sass/dashboard.scss', 'public/css/dashboard.css');

I would just use mix.scripts() for the minification, but I would also like to be able to use the import statements with NPM modules directly into the JS.

Any help would be greatly appreciated. Thanks!

Jul
25
5 months ago
Activity icon

Replied to Laravel Dusk And HTTP::mock()

So in theory there would be no need to change our controllers and everything would go along just like it has been. This would just be another Api file that it would look at if the app is in 'testing mode' persay.

Activity icon

Replied to Laravel Dusk And HTTP::mock()

I apologize if I'm looking at this the wrong way. So 99% of our controllers will be implementing the API class. We would have one API class that goes and retrieves the desired information from the proper sources, while let's say we have an ApiTest class that would act like the previous class, but instead of using HTTP at all, it would just return the formatted data just like the API class would. Just never hit anything else.

So something like this I guess is what I'm meaning.

$this->app->when(SingleController::class)
          ->needs(App\Helpers\Api::class)
          ->give(function () {
              	if (config('app.is_testing') {
			return App\Helpers\ApiTesting::class;
		} else {
			return App\Helpers\Api::class;
		}
          });

So the way the documentation shows it, I could need to add every controller that uses the API class in. What i'm wondering is if there a way to have every controller in App\Http\Controllers have that needs/give peice. I/E

$this->app->when('App\Http\Controllers')
          ->needs(App\Helpers\Api::class)
          ->give(function () {
              	if (config('app.is_testing') {
			return App\Helpers\ApiTesting::class;
		} else {
			return App\Helpers\Api::class;
		}
          });
Activity icon

Replied to Laravel Dusk And HTTP::mock()

Hmm. We have one file where all of the APIs are run through. Would there be a way to have everything in the 'controllers' folder re-route to a different API helper? Or would we have to register each controller manually?

Either way, this looks like a nice solution, and would definitely solve our problem. We could then not have the normal tests use mock either and just use a config to switch from using real APIs and Mocked ones.

Activity icon

Started a new Conversation Laravel Dusk And HTTP::mock()

Hey there, so I'm starting to get into testing my Laravel apps, and I've really enjoyed using the mock functions when dealing with external APIs. Now the app that I'm currently dealing with is all external stuff, there's no local DB currently. Given the nature of this app, and how we're wanting to have this run through a GitHub action when making pull requests, I'm not really wanting to have a .env in git with API keys.

Long story short, is there any way to use HTTP::mock() with Laravel Dusk. I've tried a good handful of things, but nothing has seemed to work.

Thanks!