Software Developer at WSP Opus

Member Since 4 Years Ago

Christchurch, NZ

Experience Points

2,125 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
Best Reply Awards
Best Reply
  • 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.


    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.


    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.

Level 24
117,875 XP
21 Sep
2 days ago

Jaytee left a reply on Wordpress And Woocommerce For A Laravel Developer?

I don't think combining Wordpress and Laravel will be a great idea here. It's going to be more work for you, and ultimately, less $$$.

For authentication, use Wordpress. Wordpress comes configured with default roles, I'm not sure if you can extend these roles, but I'd say there's a high probability there is already a plugin for "premium" access.

Product variants (e.g: Juices) can be solved using Woocommerce's variable products: https://docs.woocommerce.com/document/variable-product/

Then it's just a case of linking up to the ERM yourself.

For the theme, is it mandatory that it is custom? What about finding a theme that meets some/most of the specifications and then customising it?

This type of application is common in Wordpress, and whilst we'd all prefer to build custom applications using Laravel, Wordpress paired with woocommerce is probably the best solution here. It'll take no time at all to get the website up and running.

I used to be like you, never knew Wordpress (still don't really) and always resorted to using Laravel if I could. The problem with that is, it takes time, and time is money.

04 Sep
2 weeks ago

Jaytee left a reply on How To Avoid N+1 Problem When Loading More Results In Blade?

Take a look at this package. You can use it for the nested comments.


03 Sep
2 weeks ago

Jaytee commented on Lazy Collections

Yep, it's always been an issue on the Forums, but I got used to it. I'm in a different dimension, because I know posts are new when it says 16 hours ago for me ;)

01 Sep
3 weeks ago

Jaytee left a reply on Profile Pages Don't Show Forum Activity

Marked @bobbybouwmann 's answer as correct as seems to have been the cause. Works fine now.

28 Aug
3 weeks ago

Jaytee left a reply on Trying To Get Property 'id' Of Non-object (View: /var/www/html/reg/resources/views/pages/edit.blade.php)

You're passing $page as a string to the view in the with() method.

Change it to be: with('page', $page),

24 Aug
4 weeks ago

Jaytee started a new conversation Profile Pages Don't Show Forum Activity

Hey Jeff,

Not sure what's going on, is this intended or a bug? Viewing my own profile as well as other users' profiles shows no forum activity at all. The placeholder "No activity yet" image widget just shows.


Jaytee left a reply on Route::get Vs Route::any

Route::get() will only respond to GET requests (e.g: loading a view)

Route::any() will match all REST HTTP verbs. e.g: GET, POST, PUT, PATCH, DELETE, OPTIONS

Jaytee left a reply on Impossible To Mass Assignment Only Two Fields Even If It Is Added To Protected Fallible

Yep as per your note, you need to update the database migration. Also, since you have a name field in the database, you might want to remove that since you have first_name and last_name.

09 Aug
1 month ago

Jaytee left a reply on V-for Issue

This is the problem here:

v-for="services in service"

You need to reverse it to be:

v-for="service in services"
19 Jul
2 months ago

Jaytee left a reply on Schedule:run Once A Day (at 00:00)

use ->dailyAt('00:00')

18 Jul
2 months ago

Jaytee left a reply on Feeback Towards The Courses?

Here is an older Archive series from Jeff. Some things have changed since then, however it might be useful to just watch along and understand how the fundamental courses are put into plan with a project.


05 Jul
2 months ago

Jaytee left a reply on How Can I Have Custom Rule In A Pipe?

Keep it in the array format. It's easier to read

04 Jul
2 months ago

Jaytee left a reply on Can I Still Get Auth User After Redirects To Other Sites?

Yes. Their details are stored in the session, and the default authentication time is 2 hours.

Jaytee left a reply on Migration Error !!!

Refer to this article about fixing that error: https://laravel-news.com/laravel-5-4-key-too-long-error

Jaytee left a reply on How Long Is ONE Api Session?

So there are three answers to this:

  1. Using sessions (e.g: logging in not through an API). The session doesn't end when the user closes the tab, by default. It is an option in the configuration files tho. But the default session time is 2 hours.

  2. Your front-end API (e.g: a first-party app), instead of authenticating itself on every request, it will usually store a cookie, which I believe also uses the default session time of 2 hours.

  3. Using an API (e.g: third party), is stateless, thus auth is required on every request, therefore, yes, it is only valid for the one request.

Jaytee left a reply on Why Keys When Accessing A Cache

Caching is generally a key/value pair. The key is unique, and by searching that key, you then get the value.

Kind of like a database, in order to get a user by their id, you need to search them up by their unique id right? Same goes for caching. In order to get the cached value, you need to search it up by it's key.

02 Jul
2 months ago

Jaytee left a reply on What Div To Put The #app ID In My Blade Template.

Usually you add it to a div wrapper like you said, within the body tags. That way, even if the whole app doesn't require vue, you know you have access to it.

Jaytee left a reply on Laravel Dusk Ignoring Testing Database And Uses Main One Instead

Dump the autoloader

composer dump-autoload

01 Jul
2 months ago

Jaytee left a reply on Create Object Without Model

Ahh, so it appears the developer of the package doesn't know how to document/update their own packages.

This is the SearchParameters file: https://github.com/JolitaGrazyte/discogs-api/blob/master/src/SearchParameters.php

You'll need to call set{method} now instead of just calling {method}. E.G: setType instead of type

Jaytee left a reply on Create Object Without Model

You need to import the class at the top of the file. The namespace for it is:

use Jolita\DiscogsApi\SearchParameters

Jaytee left a reply on Class Config Does Not Exist In ....Illuminate\Container\Container.php:767

The first mistake is using Laravel Collective. It doesn't serve a useful purpose anymore, and it's better to write pure HTML forms now.

Remove the vendor folder and composer lock file, and re-install.

30 Jun
2 months ago

Jaytee left a reply on New Laravel Media Package

Nice work on creating a package, it's harder than some people think, and creating a package whether it serves useful or not, is a great achievement.

Now, down to being completely honest:

I don't see this being useful to developers out there. There are really no benefits to using this than over Spatie's package:

  1. The many-to-many relationship, I like that. However, it now involves using two tables for something that could still be used as one. In spatie's package, if we wanted global images/media, it's just as simple to setup a generic model like Site to serve as that purpose. It's sometimes better to make sure things are grouped, rather than global.

  2. Spatie also uses intervention/image underneath.

If you can add your own unique twist to this, whether it be improving the API for storing images, or adding something that the above two packages don't have, then I think you'll see a lot more use. Perhaps, add a client-side library to go with it which allows image manipulation as a GUI or something, i'm not too sure.

Jaytee left a reply on Webpack /Laravel Mix Scopes Get Messed Up - How To Fix?

I look up to @bobbybouwmann lmao. I'm only 1.2million XP behind you bobby ;)

29 Jun
2 months ago

Jaytee left a reply on Mix Cannot Find Dependencies For App.js And App.scss

@KASHOHEL - Don't bump old threads, and don't comment "it's working fine" or software that is two years old and has since been improved.

Jaytee left a reply on Call To Undefined Method Laravel\Lumen\Application::booting() Error In Lumen

As far as I can see, this package doesn't support Lumen. Not the most recent versions anyway.

Jaytee left a reply on Non-static Method Barryvdh\DomPDF\PDF::loadView() Should Not Be Called Statically

@AURAWINDSURFING - I'm not sure why anyone would want to use that approach in Laravel 5. app() and resolve() are helpers to App::make() and a facade doesn't need to be imported.

Use @bobbybouwmann 's approach, resolving it via the service container using the helper method.

Jaytee left a reply on Whenever I Reload My View It Show Me All Raw Data In Vuejs Laravel

You have two options:

  1. Add a loading spinner, which shows up until the content has loaded.

  2. Use v-cloak on the body (see vue documentation), which will hide everything until it has been loaded.

28 Jun
2 months ago

Jaytee left a reply on Testing Flash Messages And Redirects

Checkout the Laracasts flashing package, and see if you can understand how the tests are performed.


27 Jun
2 months ago

Jaytee left a reply on Seed Photo

Seeds are usually used with/without factories. They're used to populate data (whether it be real or fake, usually fake, but if you often need to seed static values, it can be used for that too) into the database.

The controller shouldn't call a seeder nor a factory.

Honestly, you don't need a seeder to generate some photos from faker, into the database. Just do something like

'file' => 'some-url-to-a-photo'

That's all you need really (unless you want different photos for testing).

Jaytee left a reply on Error Log Saying No Query Results Found But There Are Records

No worries dude, however I believe @talinon should have best answer for this. I was just explaining how jobs work and why you may receive errors :)

Jaytee left a reply on Error Log Saying No Query Results Found But There Are Records

No so what happens is, when you dispatch Jobs, it takes essentially the whole class/models and serializes them, then saves it in the database. Then when the job is run, is unserializes it from the database and builds that class up.

Remember, jobs are used to do stuff later on right? So if you think about it, we need a way to save the state of that class at that current time that we were dispatching the job, so that our application can continue executing everything else.

So whenever you make a change to those classes, it won't reflect, because the queue is still using values from the database. So that's why we flush the queue.

In general, it's good practice to flush the queue everytime you make a change to a class that is in use by a queue, UNLESS you know it isn't going to interfere with the job (e.g: adding a method, that the job doesn't use is fine).

Jaytee left a reply on Mix Is Compiling To Empty Js File

I haven't used Homestead in a loooonnnnggg time, I'm so glad I switched too because I used to always have issues with it. On mac, I use valet, and on windows, I now use Laragon (laragon is somewhat similar, it has it's own isolated environment).

Jaytee left a reply on What Are Good Datepickers For Laravel?

There are a variety of date/time pickers out there, but honestly, it depends on your requirements. Tempus Dominus works fine with a little configuration, but it has some issues, I agree.

If you need to support older browsers, then you'll need to use a package that supports modern browsers, and then user the user agent to determine whether to just show a plain datetime input or the package input etc.

Honestly, I stick with modern date/time pickers, I have no time for supporting older browsers anymore, so almost any vue / bootstrap 4 datepicker you come across will be fine, if that is your approach.

Jaytee left a reply on Laravel Passport- InvalidArgumentException: Route [login] Not Defined, When BearerToken Not Supplied.

You're getting this error because a named route login doesn't exist, for a GET request. You only have two routes, a register and login route which are POST requests.

Jaytee left a reply on Seed Photo

The issue is this line. Your ternary operator is incorrect.

<img height="50" src="{{$product->photo ? asset($product->photo->file) : '' . ' https://via.placeholder.com/100x100'}}" 

What you're saying here is, if we have a photo, get the photo, otherwise return an empty string... BUT THEN, concatenate another string (the placeholder url) on to it.

Jaytee left a reply on Test Troubleshooting / WAMP Laravel 5.8.26 W10

You haven't imported the Project model at the top of the file, thus it's trying to look for it in the tests folder instead.

Jaytee left a reply on Auth Guard Only Working For Default

  1. Don't modify any files that are in the vendor folder. That includes the trait you have modified. If you need to override a method, write it in the controller that is using the trait, using the same signatures/parameters that the original method uses. Whenever you next update, you will lose your changes.

  2. You're not telling the Auth to use your new guard. The Authenticatable class doesn't have a $guard property, and you're also not doing anything with that property.

You need to pass it to the guard method. e.g: $this->guard('employees')->attempt().....

Jaytee left a reply on Laravel Authentication With Middleware And Azure AD

From what I can see, what's happening is you're storing the user in the database, storing the user's id in the session, but you aren't actually logging in that user, thus Auth will return null.

You can log them in with something like Auth::login($user) where the $user is the newly created (or fetched from database if they already exist) object.

Jaytee left a reply on Laravel Mix Multiple File

append on to the mix file.

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

Jaytee left a reply on Mix Is Compiling To Empty Js File

@munazzil Literally once again, irrelevant. This isn't Laravel related, so clearing the cache for Laravel isn't going to make a difference.

@torch Have you got winnfsd installed or vagrant-winnfsd installed? The recommended one to install with Vagrant/Homestead is the vagrant-winnfsd. If you haven't got that installed, give it a shot and remove the regular winnfsd. If you have got it installed, I have a feeling it may be fucking with mix.


Jaytee left a reply on Best Practice For Handling User Visiting Expired E-mail Verification Link?

I'm on 5.8, and after diving into the core code for verification, I can see there is a configuration option (not sure if 5.7 has this).

Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),
26 Jun
2 months ago

Jaytee left a reply on Are View Composers Only For Static Queries?

View composers are used when the same data needs to be shared across multiple view files. Technically speaking, it can be dynamic or static data, however as far as I am aware, you cannot pass parameters to change the results, as these are setup in ServiceProviders.

For example (using this from a Laracasts video lesson): Imagine you have a navbar, and you want to show the title of the latest blog post.

The problem: In order for the navbar to receive the latest blog post, you would need to pass that blog post to every view that is rendered that includes the navbar, which in 99% of cases, would be every view. So for every method in your controller, you would do something like this:

// stuff that relates to this method

$latestPost = Post::latest()->first();

return view('my.view', compact('latestPost'));

Solution: Use a view composer to pass the $latestPost variable to the view that contains the navbar (e.g: app.blade.php or navbar.blade.php) so that the navbar has access to it

Jaytee left a reply on Mix Is Compiling To Empty Js File

@torch Sorry, not under minification. This one here: https://laravel-mix.com/docs/4.0/faq#im-using-a-vm-and-webpack-isnt-picking-up-my-file-changes

@munazzil That doesn't solve the problem. It's to do with NFS. Please, stop posting things that are irrelevant to the question. I understand you're new the forum and you want to help contribute, but contributing to questions with irrelevant answers doesn't help, and gets in the way of helping the original poster.

To make sure you're on topic, the issue here is using mix.js() with Laravel's Homestead and NFS file system on the Windows Operating System. Combining some files may work, but compiling files that need to run through webpack won't.

Jaytee left a reply on Mix Is Compiling To Empty Js File

Try looking at this here: https://laravel-mix.com/docs/4.0/faq

under the second FAQ question about minification. See if that will fix it with nfs

Jaytee left a reply on Mix Is Compiling To Empty Js File

Try update laravel mix. Package.json might be referencing 4.0.7 but node_modules may actually have a older version. 4.0.7 fixed compiling issues on windows, so it's possible that you're actually on a lower version, and it just didn't update. Best way to do it is remove laravel mix and re-install. Refer to the commands above that I posted if it fails to install.

Jaytee left a reply on Mix Is Compiling To Empty Js File

Shouldn't make a difference, but can you show us your app.js file and any other files like bootstrap.js please.

25 Jun
2 months ago

Jaytee left a reply on Mix Is Compiling To Empty Js File

Are you using dynamic imports with vue files? This could be the issue.

Jaytee left a reply on Mix Is Compiling To Empty Js File

You'll no doubt have issues installing node modules on Windows. It's always been like that.

Usually using yarn with --no-bin-links will resolve the issue of installing node_modules again.

@munazzil Once again, it's not related. We're talking about Laravel Mix compiling JavaScript, not Vue