Member Since 5 Years Ago


Experience Points

3,840 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 7
31,160 XP
04 Sep
2 weeks ago

ZetecVan left a reply on Wokring Using Git

This is a good document to follow and develop a good git workflow.


02 May
4 months ago

ZetecVan left a reply on Documenting Your New Project

Jira is probably overkill for a side project. Because I'm a team of one I've been creating stories in Trello.

I think it might be my approach. Thinking about it, I tend to do some work on feature A, some work on feature B, some work on feature C. I need to be more structured. Do feature A until it's complete. Do feature B until it's complete.

01 May
4 months ago

ZetecVan started a new conversation Documenting Your New Project

When you decide on a new project (for yourself, not a client), what do you use to keep all your ideas in one place?

Do you plan your project out in great detail or take an Agile approach and create an MVP and let it evolve? Do you keep a document outlining features, or do you let your tests be the documentation?

I've used Trello, spreadsheets and Evernote, but I just don't seem to be organised enough to make it stick. I tend to work on a project for a few months, then break off when it's live. A few months down the line when I start to work on it again, I seem to always get a bit lost and it takes a while to get back with it.

08 Jan
8 months ago

ZetecVan started a new conversation Email And Mailboxes. What Do You Do?

So, you've created your app, you're hosting it on Digital Ocean, you're using Mailgun to send emails from your app, and it's all working sweetly.

But what do you all do for incoming emails that don't go via the app?

When there's only one of you, you can forward everything to your gmail via Mailgun routes, but my latest app has a few on the team, and we want to be able to send emails from [email protected] and [email protected] etc.

Can anyone point me in the right direction?

Edit: To clarify, we want to be able to send and receive emails independently from the app but using [email protected]

20 Feb
1 year ago

ZetecVan left a reply on `spark New` No Longer Works For V5

I had this last night. That is exactly what I did to fix.

22 Dec
1 year ago

ZetecVan started a new conversation How Do You All Configure Your Mailboxes?

I've just gone live with a side project. Site emails go through Mailgun. I want to be able to configure a mailbox so I can receive emails. At the moment I have a couple of Routes set up within mailgun to route them to a gmail account. This isn't ideal for me and would like to have a mailbox I can log into to pick up and send emails from that domain.

Someone suggested using Migadu, so I've looked into that and it looks ideal. But the question is, how do I configure Mailgun and/or my DNS Records so I receive mail into Migadu?

Or am I doing this wrong and there's a better solution.

23 Nov
1 year ago

ZetecVan started a new conversation Queues - Redis/Horizon Vs Beanstalkd

My project requires me to parse an xml file, and store the data in a couple of mysql tables. While developing, I've been using Beanstalkd to fire a job to store each xml 'record' and then once all the xml has been parsed, I've read that table, firing off a job to update other records/tables based on that record.

It runs quite smoothly, although can take a while because of the number of records.

Tonight I thought I'd give Horizon and Redis a go. I switched it out and triggered the job to parse. That went through quicker than Beanstalkd. Then it automatically triggered the rest of the processing. It processed the first record, and then just sat there for about five minutes. I was checking everything to see why when the next job kicked in.

So instead of each job taking just a second, they're taking a random time from a second to a minute or so. All the job is doing is reading the parsed record and updating a couple of existing records or creating a couple of new ones.

Has anyone else experienced this sort of behaviour?

09 Nov
1 year ago

ZetecVan left a reply on Gatekeeper

But what's it for....?

03 Oct
1 year ago

ZetecVan left a reply on Importing Large CSV Or TXT Files

There is this that will help you import CSVs: http://www.maatwebsite.nl/laravel-excel/docs/import

I've not worked with it, although I did look at it for something I was going to do.

One of my projects imports an XML file with 26,000 rows. For that I parse the XML, and read though it. For every record I fire off a job that saves it to the database. It only takes a few seconds for the 26000 rows to be read, then the records are saved in the background.

28 Sep
1 year ago

ZetecVan left a reply on What Music Do You Listen To When You're Programming?

Just like @mcstepp I tend to listen to stuff I don't know, usually with no words, so I don't get distracted and start singing/humming along. Quite often it's classical music, or piano. A few of Spotifys 'Concentration' type playlists are terrible, and repetitive.

22 Sep
2 years ago

ZetecVan started a new conversation Component Within A Component Props

I have created a 'like' component, which is passed a prop of the id of the thing being liked, and whether it is currently liked. It works when it's stand alone, but when I put it within another component, it doesn't work out whether it's already liked. Here's the code for the component.

            :post={{ $post->id }}
            :favorited={{ $post->favorited() ? 'true' : 'false' }}

I think my issue is that the parent component does an axios call to an internal api, and that returns whether it's liked or not (amongst other things). I put a console.log in the child components mounted method to output the value of 'favorited' prop, and it returns undefined, however, looking at that same prop in Chrome Vue Tools, it's populated properly.

    export default {
        props: ['post', 'favorited'],

        data: function() {
            return {
                isFavorited: '',

        mounted() {
               console.log(this.favorited)        // Returns undefined
           this.isFavorited = this.isFavorite ? true : false;

        computed: {
            isFavorite() {
                return this.favorited;

        methods: {
            favorite(post) {
                    .then(response => this.isFavorited = true)
                    .catch(response => console.log(response.data));

            unFavorite(post) {
                    .then(response => this.isFavorited = false)
                    .catch(response => console.log(response.data));

It's as if the component is mounted, before the parent component is fully loaded. Does anyone know how to solve this?

08 Sep
2 years ago

ZetecVan left a reply on Best Way To Deal With Public API Routes

Are your api routes using the auth:api middleware? Is the api designed to be publicly accessible or is it only for logged in users?

The api for my app is only to be consumed by vue. Some of the fields in the transformers are only available to logged in users, so I created a new middleware (based on the auth middleware) that still allows non-logged in users to consume the api, but with "Log In" returned against some fields.

ZetecVan left a reply on Always Free Plan (no Trial), But With Possibility To Subscribe To Paid Plans

This is something I'll need to do in the future. I'm coding my app and haven't given thus much thought as I assumed it would be possible.

Why can't a user upgrade to a paid plan if they choose the free initially?

ZetecVan left a reply on Vue Laravel And Laravel Passport

I have started using Passport on my latest project.

I have created one Laravel App. I am creating API endpoints (with the routes in the API routes file, in the Auth & API middleware group).

These are consumed by the VueJS front end. It allows me to be able to determine the signed in user without having to create tokens that would be used if I was using an external client to access the api. (details at the end of the passport install page: https://laravel.com/docs/5.5/passport)

So the answer is, no you don't need to create two different web apps.

01 Sep
2 years ago

ZetecVan left a reply on I Have A Technical Laravel Test

Congratulation! Nice work on the app.

31 Aug
2 years ago

ZetecVan left a reply on I Have A Technical Laravel Test

How long did you get to do the test? Did you complete it? And did you have access to the internet?

22 Aug
2 years ago

ZetecVan left a reply on Package Recommendation, Wordpress Like Settings In Laravel ?

Laravel Voyager is a back end admin package that allows you to set up configuration options. Take a look at that.


18 Aug
2 years ago

ZetecVan left a reply on Where To Store Settings Data

I would probably use the cache.


Cache::put('key', 'value', $minutes);


Cache::add('key', 'value', $minutes);
11 Aug
2 years ago

ZetecVan started a new conversation Queues, Events And Status Updates

I am developing a web app where a user will has a list of jobs on his dashboard. These jobs run periodically on a queue, or can be triggered manually with a button. I have a 'Last Run' column. When the job is running I want to be able to change the value to 'Running'. When it finishes, i want to be able to broadcast a message to that user and update the Last Run date and time.

I am ok with the broadcast message. I need to get my head round how to update the job status value when it's running. (I'm not necessarily after code, just 'do this, then this then this' will be fine). Polling the database every few seconds for the status would be inefficient, so what alternatives are there?

Would it be a case of using Echo, listening for an event then change the value using vue?

I'm using Laravel 5.4 and Vue 2.0.

13 Jun
2 years ago

ZetecVan left a reply on Strange Behaviour When Migrating

I can be stupid lots of times in one day when it comes to code... :-)

06 Jun
2 years ago

ZetecVan left a reply on Broken Link

Ah yes. All the links on the top of the page go to Google.

And the skills link in the middle is missing.

30 May
2 years ago

ZetecVan left a reply on Socialite Connect Multiple Social Accounts With Different Emails

This is something I will have to be doing for a project I'm planning. Once you've linked one social account, are you logging the user in? If so, any future social accounts that are linked can be linked to the currently logged in user.

26 May
2 years ago

ZetecVan left a reply on Polymorphism: Why Should I Violate Database Design?

This thread was started a year ago. Hopefully @tylernathanreed has found a solution.

12 May
2 years ago

ZetecVan left a reply on Laravel Frustration

I'm glad you're all coming out as old. I'm 47 was was beginning to think I was the oldest here.

ZetecVan left a reply on Laravel 5.4 - How To Create Separate Login For Admin And User

Also, look for the Laravel Voyager package. That provides an admin login and panel.

19 Apr
2 years ago

ZetecVan left a reply on API Authentication

So I take a break for ten minutes and it comes to me.

Change the middleware in routes/api.php to just api.

Then in the transformer method,

        if ( Auth::guard('api')->user()) {
            // additional data goes here.

ZetecVan started a new conversation API Authentication

I have an API which I need to work for non-authenticated users, but if the user is authenticated, to return extra information.

I am using Laravel 5.4, Spark, and have installed Fractal for transformers.

My API routes are

    'middleware' => 'auth:api'
], function () {

    Route::get('/categories/{categorySlug}/{subcategorySlug?}', 'API\[email protected]'); // Gets file


So for a logged in user this returns the right results. For a non-logged in user I get "Unauthenticated".

I can't put the Route::get outside the Route::group closure as it doesn't run the auth to get the user.

Is the solution to create some new middleware to replace the auth?

17 Apr
2 years ago

ZetecVan left a reply on Passport Returns An Empty User For Authenticated User

Ok so I created a new laravel project, did the auth scaffolding, installed Passport, did the api call and it worked as expected.

So then I installed Spark, and it stopped working. It's doing the same as above. So the cause is within spark...

ZetecVan started a new conversation Passport Returns An Empty User For Authenticated User

I'm creating an internal API that needs to know if a user is authenticated or not. I'm using Laravel 5.4 and Spark 4.0. I've installed Passport as per the docs.

There is a video I found (https://laracasts.com/series/whats-new-in-laravel-5-3/episodes/13) where Taylor explains Passport. About 3/4 through he explains about consuming your own API for authenticated users. I've followed that, but am getting an empty response from the return $request->user() part, even though I'm logged in.

Here's some code:

    'middleware' => 'auth:api'
], function () {

     Route::get('/user', function() {
         return['username' => 'test'];

Route::get('/user', function (Request $request) {
    return $request->user();

So it's not authenticating via the middleware auth:api, and it's hitting the /user outside the middleware closure.

In my vuejs component I have

    export default {
        mounted() {
            console.log('Component mounted.')
            .then(response => {


and in my App.js I have

Vue.http.headers.common['Accept'] = 'application/json';
Vue.http.headers.common['X-CSRF-TOKEN'] = Spark.csrfToken;

I can see through Chrome Devtools that there is a Cookie:laravel_token on the GET /api/user request as explained in the video, but my reponse.data is empty.

Can anyone help?

16 Apr
2 years ago

ZetecVan left a reply on Consuming An Internal API With Spark.

Thanks @cronix. I thought it was that one before I asked, but it's not. I'm sure in the one I was thinking of he did something in the controller to show whether it was authenticated or not. Like a Auth::user().... although I could be imagining the whole thing...

ZetecVan started a new conversation Consuming An Internal API With Spark.

I am using Vue Tables 2 to call an internal API to list some data. I want the API to retrieve more data for logged in users (ie: some values are to be unavailable to non-logged in users, to encourage them to sign up).

In the Spark docs there is this:

Spark makes it entirely painless to consume your API in this way. Simply make requests to your > API routes using your JavaScript framework as normal. You do not need to pass any token or credentials. All of the authentication will be handled automatically by Spark, which generates "transient", short-lived API tokens behind the scenes automatically when users load your application's pages. These API tokens are automatically refreshed in the background by Spark.

I remember seeing a video a while ago where (I think) Taylor demonstrates this functionality. Can anyone point me in the direction of the video, or suggest any way to do this.

01 Apr
2 years ago

ZetecVan left a reply on How To Store Nested Json To Database?

Is it a mySql type relational database, and you're wanting to store each value to a different field?

If not, and you want to store that object in a single field, you can just populate the field you want to save it in by:

$table->field =  serialize(json_decode($json_object);

then saving it. However that's probably not ideal.

22 Mar
2 years ago

ZetecVan left a reply on How To Import An Existing Database

If you have an existing database, you don't need to do the migrations. You could just point the env details to the database you want to use.

However, I'd probably create a new database and the tables using migrations, and then export the data from the existing database using MySQL Workbench and import it into the new database, because I'm ocd like that.

ZetecVan left a reply on Saving Twice To Database

@Shiva Are you wanting the Ajax to POST the form. If you add that $.ajax call back in, and add event.preventdefault(); after the $(".add-form").submit(function(event){ line, it will stop the form being submitted through the html.

ZetecVan left a reply on Saving Twice To Database

You won't need the


because the failure has already done a return, so if it gets to that point it must have passed.

If you comment out the sync line, does it only save it the once?

03 Mar
2 years ago

ZetecVan left a reply on Vue Does Not Work

I had a frustrating issue with a component I created the other day. I can't remember what the exact message was, as I'd had the 'are you sure you've registered' message during debugging.

It turned out, I hadn't closed a

tag in the line before <my-component>.

27 Feb
2 years ago

ZetecVan left a reply on L5.4 Styles Is Not A Function

Ok, so I have found out that there's a function .combine that works.


So does that suggest that the official laravel docs need updating?

ZetecVan started a new conversation L5.4 Styles Is Not A Function

I'm migrating a 5.3 app to 5.4. When running npm run dev, I get


TypeError: mix.styles is not a function

This is my css section:

    ], 'public/css/styles.css');

There's nothing in the docs that say you have to do anything else: https://laravel.com/docs/5.4/mix#plain-css

Does anyone have any ideas?

24 Feb
2 years ago

ZetecVan left a reply on Nested Resource : Missing Required Parameters

I think your blade route should be an array if passing multiple parameters.

<li><a href="{{ route('admin.startups.usecases.show',["startup_id" => $startup->id, "usecase_id" => $usecase->id]) }}">Show</a></li> 

ZetecVan left a reply on Nested Resource : Missing Required Parameters

I think it's the order your routes are appearing.

|        | DELETE    | admin/startups/{startup}                         | admin.startups.destroy          | App\Http\Controllers\[email protected]                             | web,admin,auth:admin |

appears above

|        | DELETE    | admin/startups/{startup}/usecases/{usecase}      | admin.startups.usecases.destroy | App\Http\Controllers\[email protected]                             | web,admin,auth:admin |

So when it's looking for a route, it finds the one with one parameter first.

Try manually adding the show, edit and delete routes for the startups manually above the resources just to see...

Route::get(admin/startups/{startup}/usecases/{usecase}', '[email protected]')->name('admin.usecases.show');

I'm probably totally wrong, as you're using named routes...

ZetecVan left a reply on So I Have An Issue With Nested Foreach Loops..

No problem! Glad it's sorted.

23 Feb
2 years ago

ZetecVan left a reply on So I Have An Issue With Nested Foreach Loops..

This should work

    foreach($sales['product_id'] as $key => $value)
      if( !empty($sales['cookies'][$key] ) ){
        $invoice->products()->attach( $value, ['qty_sold' => $sales['cookies'][$key] );

ZetecVan left a reply on So I Have An Issue With Nested Foreach Loops..

I think the problem is that you're reading though the $sales array twice inside each other.


Edit: I doubt this will work. Can you give us an example of your $sales array with real data?

// Save the record.

// Now input the product sold and the quantity into the pivot table..
foreach( $sales['product_id'] as $product_id ){          
   if( !empty($sales['cookies'] ) ){
      $invoice->products()->attach( $product_id, ['qty_sold' => $sales['cookies'] );
21 Feb
2 years ago

ZetecVan left a reply on Upgrading A Messy 4.2 App To 5.4

I'm currently migrating an old 4.2 app (with no tests) to 5.4.

I'm taking @ohffs method of migrating most of the code and re-writing the payments part, as it's now going to be using Spark instead of using Paypal (which was a nasty way to do it)

14 Feb
2 years ago

ZetecVan left a reply on Get Latitude And Longitude Dynamiclly From Database

I came across this tutorial yesterday, as I'll be planning on doing something similar soon.


It uses a javascript library that the guy wrote.

It may or may not help you...

10 Feb
2 years ago

ZetecVan left a reply on Multitable Forms/Inline Editing

Thank you @christianTorino, that is very useful. I'll have a proper look at in in a while.


08 Feb
2 years ago

ZetecVan started a new conversation Multitable Forms/Inline Editing

Hi all

I have an existing app that I'm re-writing to use vuejs to make the user experience a bit more slick. The app lists businesses, along with their address, opening times, photos, tags and contact details. Each of these elements are in their own table.

It's all currently maintained by me in the admin section. Each table has their own form. I'm re-writing it to use vue and let the customer maintain it.

I'm thinking about attempting to use inline editing. ie: It shows the business as it would on the front end of the site, and if they hover over an editable field it allows them to click it and it becomes editable.

Does anyone have any experience of doing this in vuejs? Can anyone point me in the right direction? Or does anyone have any alternative suggestions?


ZetecVan left a reply on Codeigiter To Laravel

I ended up recoding an old Codeigniter project from scratch. It highlighted how bad I coded back then...

01 Feb
2 years ago

ZetecVan left a reply on Custom Permalink Per Article

There is also a package called Sluggable which will handle the sluggifying for you.


18 Jan
2 years ago

ZetecVan left a reply on Laravel Homestead - Installation - Timeout

For anyone who is having the same problem, but the solution above doesn't solve it (like in my case), you could try adding

config.vm.provider :virtualbox do |vb|
  vb.gui = true

to your vagrantfile. This fixed it when I was having problems recently.