Member Since 2 Years Ago

CEO - Founder at CADWOLF

Experience Points 3,980
Experience Level 1

1,020 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 28
Best Reply Awards 0
Best Reply
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement


    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement


    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

16 Apr
1 year ago

joshuaf started a new conversation Stripe Plan Name Shows As "default"

I have created a test plan in my stripe dashboard with the name "Enterprise Monthly" and done a fake charge for team billing. When had a user subscribe to this plan, the resulting spark data for the team, the spark data for Spark->State->Teams->[0]->subscriptions->[0] was as follows ...


I expected the Spark name variable for this subscription to have the formal name of the plan ... like "Enterprise Monthly" or whatever name I give it in the setup for the product. I don't know why the default is there.

Any suggestions? This is test data if that matters.

joshuaf left a reply on Upload Profile Image To S3 Bucket

I thought that was the case, but since I have a database entry for each team and user and user and those entries have a unique ID associated with them ... my thinking was that I would have a folder for "profile" images and a folder for "team" images and the name of each would simply be the ID number. That way, if there was every any database issue, I would know which image went with which user/team via the name.

14 Apr
1 year ago

joshuaf left a reply on Upload Profile Image To S3 Bucket

V6 of spark has per seat team billing. It's a big deal for my site and I kinda thought version 1 would do it, but it's nice to have it now.

joshuaf left a reply on Upload Profile Image To S3 Bucket

Thanks. Worked like a charm. Any recommendation as to how I can force the naming convention? I want to assign specific names instead of the random string.

joshuaf started a new conversation Upload Profile Image To S3 Bucket

So, I have my own code to upload a profile image to an s3 bucket, but I also want it to work for the settings/profile page. I would think that this would be easy as this is something that most people have to do, but I don't see an easy solution or anything in the docs about it.

Altering the photo controller is not really realistic as I deploy with composer. It is possible to alter the updaet function in update-profile-photo.js asset to point to a different URL, and then rebuild the assets, but this seems wrong.

I tried simply adding a route to direct the /settings/photo post call to my own function, but that never worked for some reason.

joshuaf left a reply on Spark Prepending URL To Images

So, I eventually realized that the code may be prepending the URL because I was settign the photo_url variable to a relative path /Profile/image.jpg. When I set it to the full address, nothing was prepended.

13 Apr
1 year ago

joshuaf left a reply on Spark Prepending URL To Images

I kinda already thought about that and I got so frustrated that I bypassed that function altogether and wrote my own code to upload and store the image. Yet there is still some snippet of code somewhere that injects that path.

12 Apr
1 year ago

joshuaf started a new conversation Spark Prepending URL To Images

Whenever I upload an image, spark is prepending the entire base URL to the photo_url parameter. I don't see an option to prevent this in the config/app or anywhere else.

I just want to be able to set the photo_url to my desired text.

09 Apr
1 year ago

joshuaf started a new conversation Looking To Pay Someone To Do Spark 6 Install

So, I have an application running spark. I have been messing with the upgrade for about a month and fixed a number of items that have simply taken far too long.

I have decided that the best route is to pay to have it addressed and since Spark doesn't offer paid support, I thought that I would look here.

My app is deployed on heroku and uses a composer installation. Reply here if you can help. You can see some of the issues that I have had to address in the spark github.

30 Mar
1 year ago

joshuaf started a new conversation Spark Views Not Functioning Correctly

Upgraded to version 6. For some reason, none of the views updated and new ones were not written. (I had changed some, but not many). The views do not seem to function in many ways for me.

Clicking to edit a team results in an error. Switching teams results in an error. No subscriptions show despite the fact that the JSON plans are downloaded The links in the left menu are not functioning properly.

I made a video showing these things that is here.

I have had a number of problems with the upgrade. I am not sure if these issues are related to bootstrap 4 not being accessed properly or something along those lines.

27 Mar
1 year ago

joshuaf started a new conversation Spark Controllers Not Present

I upgraded my Spark to version 6 and got an error when I pushed to my staging app. The error noted that the TeamController was not present. Checking the controllers in my app/Http/Controllers folder, I found that those files were indeed missing. That are present in the vendor/laravel/spark-aurelius folders.

I then looked at previous versions of my code and found that there were a number of controllers that were never installed - despite the fact that I had been using spark with teams for a couple of years.

I deploy on heroku, so maybe the heroku build had those files and something has now changed that prevents that build from creating those files as well.

I tried to republish the vendor files, but that didn't do anything.

Any ideas?

20 Mar
1 year ago

joshuaf left a reply on Token / Security Issue With Spark After Migration To Github

Also, I installed and upgraded via composer and not the command line. The docs say that spark should have prompted me for a token if one was needed. I have also been using this repo for a while and it has been working fine.

joshuaf left a reply on Token / Security Issue With Spark After Migration To Github

How do I get that token and what's the command to enter it? I tried the "spark token" and it isn't recognized.

joshuaf started a new conversation Token / Security Issue With Spark After Migration To Github

I recently moved my code from bitbucket to github. I also created a pipeline on heroku with a new staging app. When I try to push code to the staging app, the spark install fails with the following error ...

Failed to download laravel/spark from dist: ... ... Failed to execute git clone --no-checkout '[email protected]:laravel/spark.git' '/tmp/build_b...

I believe that this is because I need to set a token or something for spark to recognize the repo coming from github? Although I am still logged into github with the same account ... Anyway, I am connected to spark's repo and while there is mention in the install docs of composer prompting you for a token, there isn't any description of what this is, where to get it, or where to place it.

I had the same issue a year ago and it appeared to be due to the fact that my associate purchased the license and not me. I had to buy a second license to fix the issue. Been stuck on this for a few days and could use some help. Thanks

16 Mar
1 year ago

joshuaf left a reply on Npm Run Dev Dependency Not Found (bootstrap/dist/js/npm)

Don't know how you worked this out, but it appears to have worked for me as well

joshuaf started a new conversation Error Upgrading To Version 6 - Github Token?

I upgraded laravel spark to version six and connected to the github repo on the site. Everything seemed to go OK on the npm install command, but when I ran the npm run dev, I got a slew of errors that basically told me that things related to spark were not found. Seems to be related to the new mix stuff? Do I need a new github token?

These dependencies were not found:

  • auth/register-braintree in ./resources/assets/js/spark-components/auth/register-braintree.js
  • auth/register-stripe in ./resources/assets/js/spark-components/auth/register-stripe.js
  • kiosk/add-discount in ./resources/assets/js/spark-components/kiosk/add-discount.js ....

It suggested that I install these dependencies but running those commands resulting in an error that seems like I am being denied access to the github repo.

Error while executing: npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/auth/register-braintree.git npm ERR! npm ERR! Warning: Permanently added the RSA host key for IP address '' to the list of known hosts. npm ERR! Permission denied (publickey). npm ERR! fatal: Could not read from remote repository. npm ERR! npm ERR! Please make sure you have the correct access rights npm ERR! and the repository exists.

I bet that there is a connection on github somewhere that I am missing. I connected to the repo on the site ... Suggestions?

02 Apr
2 years ago

joshuaf left a reply on Redirect After Login

What I ended up doing was altering the home page to be what I wanted. My page is an angular app, so I added a button for the user to "Launch" the app. Not my favorite, but works OK.

16 Mar
2 years ago

joshuaf left a reply on Spark Install Fails To Production Server

For those of you saying that we need to join the spark github page, what if we are using bitbucket?

joshuaf started a new conversation Spark Started Failing In Heroku Push - Github Error


So, I have been using spark for several months on a project. A few days ago, the heroku build started failing with the error :

Installing laravel/spark (v1.0.14) Downloading: Failed Failed to download laravel/spark from dist: The "" file could not be downloaded (HTTP/1.1 404 Not Found)

I tried upgrading to the newest version but that failed too. I have no idea why it started failing and I have tried contacting spark and just about everyone else I could think of. I really need this fixed ASAP. Thanks

23 Jan
2 years ago

joshuaf started a new conversation Redirect After Login

I simply want to redirect a user to my preferred page after they login. I deploy to heroku and composer installs everything when a push is made so altering the Spark code itself is not going to work and it is generally not a good thing to alter vendor code.

Here are some things I have tried.

Altering the redirectTo and redirectPath variables in the auth controller and the password controller in my app.

Adding a login controller to my app - independent of spark - and then resetting the same variables.

Attempting to call the afterLoginRedirectTo and afterAuthRedirectTo functions in the Spark service provider. This returned an error indicating that the functions did not exist. There is no documentation for these functions that I have found and I am not sure where the person who told me this got that function name from.

Adding in a redirectTo function

This is obviously very frustrating. I am not sure why this isn't something that is dealt with in the documentation and handled as an option as this is something that most users would want to do.

Anything is helpful.

22 Jan
2 years ago

joshuaf left a reply on Change Redirect Location After Login

None of these things work for me.

Spark::afterLoginRedirectTo('/new-uri'); returns an error that the function does not exist and the link above returned a 404.

The answer as to seeking to intended path does not deal with cases where the user is simply chooses to login. Even still, it does not address what should actually be done to solve the problem.

Changing the redirectTo and redirectPath variables solves the problem on my local machine. However, this is not a long term solution as deployments where composer installs the software overwrites these variables. Changes in the laravel password and auth controller have no effect.

Anyone find an actual solution anywhere?

18 Jan
2 years ago

joshuaf started a new conversation Install On Heroku Push Seems To Affect Spark Registration Parameter

I am running a laravel app that is using Spark. I have added an additional registration field called "username" and everything works fine on my local environment - homestead.

I have deployed to heroku and the app is running fine and the database migration worked. However, when I submit the registration form I get an error that shows that the registration failed because the username parameter was null - which was not allowed.

The logs are shown below. As you can see, the full list of parameters that include the username makes it into the create user event. However, it gets lost.

Is this because Spark and the other dependencies are rebuilt each time the git repo is pushed to heroku? If that is the case, I am surprised that my changes to the form itself are still shown.

Is there something else that I need to address?

at Model->insertAndSetId(object(Builder), array('name' => 'Joshua
Foxworth', 'email' => '[email protected]', 'password' =>     'pass',     'last_read_announcements_at' => object(Carbon), 'trial_ends_at' => '2017-    01-19 02:53:48', 'updated_at' => '2017-01-19 02:53:48', 'created_at' =>     '2017-01-19 02:53:48')) in Model.php line 1597

at Model->performInsert(object(Builder), array()) in Model.php line 1488
at Model->save() in UserRepository.php line 86
at UserRepository->create(array('stripe_token' => '', 'plan' => '',     'team' => 'defaultTeam', 'name' => 'Joshua Foxworth', 'email' =>     '[email protected]', 'password' => 'pass', 'password_confirmation'     => 'pass', 'address' => '', 'address_line_2' => '', 'city' => '',     'state' => '', 'zip' => '', 'country' => 'US', 'vat_id' => '', 'terms' =>     true, 'coupon' => null, 'invitation' => null, 'errors' => array('errors' =>     array()), 'busy' => true, 'successful' => false, 'username' => 'MyName'))
at call_user_func_array(array(object(UserRepository), 'create'), array(array('stripe_token' => '', 'plan' => '', 'team' => 'defaultTeam', 'name' => 'Joshua Foxworth', 'email' => '[email protected]', 'password' => 'pass', 'password_confirmation' => 'pass', 'address' => '', 'address_line_2' => '', 'city' => '', 'state' => '', 'zip' => '', 'country' => 'US', 'vat_id' => '', 'terms' => true, 'coupon' => null, 'invitation' => null, 'errors' => array('errors' => array()), 'busy' => true, 'successful' => false, 'username' => 'MyName'))) in CallsInteractions.php line 56
at Spark::interact('Laravel\Spark\Contracts\Repositories\[email protected]', array(array('stripe_token' => '', 'plan' => '', 'team' => 'defaultTeam', 'name' => 'Joshua Foxworth', 'email' => '[email protected]', 'password' => 'pass', 'password_confirmation' => 'pass', 'address' => '', 'address_line_2' => '', 'city' => '', 'state' => '', 'zip' => '', 'country' => 'US', 'vat_id' => '', 'terms' => true, 'coupon' => null, 'invitation' => null, 'errors' => array('errors' => array()), 'busy' => true, 'successful' => false, 'username' => 'MyName'))) in CreateUser.php line 63

Here is the create function in the UserRepository.

public function create(array $data)
    $user = Spark::user();

        'name' => $data['name'],
        'email' => $data['email'],
        'username' => $data['username'],
        'password' => bcrypt($data['password']),
        'last_read_announcements_at' => Carbon::now(),
        'trial_ends_at' => Carbon::now()->addDays(Spark::trialDays()),

    return $user;
05 Jan
2 years ago

joshuaf started a new conversation Spark Registration Redirect Not Working

I am trying to redirect a user to a page when they register. I have accomplished this redirect when the user logs in (after initial registration) by altering the following line in the LoginController in vendors/laravel/Spark/src/Http/Controllers/Auth

protected $redirectTo = '/Profile/';

In attempting to do the same thing for the registration, I altered the same line in the RegisterController at the same address. However, that did not work.

I traced the code down to the RedirectsUsers trait which first looks for the redirectPath property and then for the redirectTo property. So it seems like this should work.

However, I get redirected to 'undefined' which would seem to indicate that the 'redirectTo' variable is either protected somewhere that it should not be or is simply missing. The variable is present in the authController for laravel.

Any suggestions on where to look?

31 Dec
2 years ago

joshuaf started a new conversation Spark Add Team Produces Error

I seem to have Spark set up correctly. I can register a user and a team is created for them with no problem. I have set up my own APIs to change team names, invite users to a team, remove users from a team, and do pretty much everything else.

However, when I try to add a team I get an error. The error is the same whether I use the settings page that Spark provides or I attempt to create a team via the proper URL. I wonder if maybe the error is related to using postgresql instead of mysql. The error is ...

QueryException in Connection.php line 729: SQLSTATE[42803]: Grouping error: 7 ERROR: column "" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: ...sers"."user_id" = $1 and "owner_id" = $2 order by "name" asc ^ (SQL: select count(*) as aggregate from "teams" inner join "team_users" on "teams"."id" = "team_users"."team_id" where "team_users"."user_id" = 7 and "owner_id" = 7 order by "name" asc)

Looking at the proper function in the Settings/Teams/TeamController, I find ...

 * Create a new team.
 * @param  Request  $request
 * @return Response
public function store(Request $request)
    $team = $this->interaction($request, CreateTeam::class, [
        $request->user(), $request->all()

I don't see how this could be a problem as the user and the request objects should have everything they need. I am also confused as to how the initial team creation works when a user registers but fails when a user adds a team.

28 Dec
2 years ago

joshuaf started a new conversation Added New Registration Field, Getting Error

I followed the directions on the spark site to the best of my knowledge, but still got an error. All I wish to do is to add a username field.

I have added the entry in the migrations database. I have also verified that the required data is indeed sent to the server via the request.

The error is

ErrorException in TeamRepository.php line 35: Trying to get property of non-object

It appears that the data for the user is either not being passed properly, or the user isn't being created properly.

Here are the first few lines from the log

in TeamRepository.php line 35 at HandleExceptions->handleError('8', 'Trying to get property of non-object', '/home/vagrant/Code/vendor/laravel/spark/src/Repositories/TeamRepository.php', '35', array('user' => null, 'data' => array('name' => 'teamDefault'))) in TeamRepository.php line 35 at TeamRepository->create(null, array('name' => 'teamDefault')) at call_user_func_array(array(object(TeamRepository), 'create'), array(null, array('name' => 'teamDefault'))) in CallsInteractions.php line 56 at Spark::interact('Laravel\Spark\Contracts\Repositories\[email protected]', array(null, array('name' => 'teamDefault'))) in CreateTeam.php line 58 at CreateTeam->handle(null, array('name' => 'teamDefault')) at call_user_func_array(array(object(CreateTeam), 'handle'), array(null, array('name' => 'teamDefault'))) in CallsInteractions.php line 56 at Spark::interact('Laravel\Spark\Contracts\Interactions\Settings\Teams\[email protected]', array(null, array('name' => 'teamDefault'))) in Register.php line 58

Additionally, I found the instructions to be difficult to understand in some ways. Why does the addition of a parameter require the need for totally new functions like 'createUsersWith' instead of just adding items? Why do we need to include items lime the name, email, terms, etc? Do we need to include them or is that just redundant? If we need to include them, why not the rest of the parameters?

20 Oct
2 years ago

joshuaf left a reply on GitHub-style Org & User Billing

I have been asking this question here and other places for days now. If you solve it, please fill in the info here.

18 Oct
2 years ago

joshuaf started a new conversation Spark And Team Billing Vs Account Billing

I have a basic question about spark and teams. I have a SASS project where I would like to charge a company for each user on their account. So, I want to charge something like $100 per person on the "team" per year. While spark offers type of charging, it only does so by letting you set a series of plans with X number of users. This isn't really charging per user on an account. Unless ... I am mistaken about this? i.e. 5 users or less is $500 a year 10 users or less is $1,000 per year, etc

In addition to this, I would like for my clients to have the ability to set up "teams" of people that have nothing to do with billing. If you have a project that you would like to assign to three people - you create a team with those three people and give that team certain permissions. A user could invite people on totally separate accounts to join a team and have permission to work on their project. Spark seems to be kind of set up for this as well since you can have multiple teams.

This is really confusing me. Is Spark a tool for billing a company for all of its users, or is it a tool that lets you set up teams of users for permissions and collaboration purposes. On the one hand, it seems to be a tool to simply set up a team system since you can have multiple teams that consist of users you do not pay for. On the other hand, teams are used to charge accounts.

What am I missing here?

17 Oct
2 years ago

joshuaf left a reply on [Laravel 5.1.] Auth::user() Returns Null

Placing the code in the boot function caused an error for me. Any idea why that would happen?

joshuaf started a new conversation Spark - Current User Returns Null

The registration form for spark shows up and when the user hits enter, the new entry shows up in the database. However, calling the [email protected] method returns nothing.

This method simply returns the result of Spark::interact(UserRepository::class.'@current');

Returning to the register or login page redirects back to the home - indicating that the user is indeed logged in. This is on homestead if that matters.

I know that the route is working because I did a var_dump with a string and it returned that for me. Doing the same spark command in tinker returned the same result.

joshuaf started a new conversation Spark - Why The Initial Team And Docs?

I would like to use spark with team functionality engaged. To do this, my thoughts were that a user would create an account and then create their own teams and/or join other teams. I don't understand why an initial team is required to have a user register. Am I not really understanding what the team system is for?

Also, I can't seem to locate a lot of the documentation for spark. It notes that I can set up accounts to bill by the team user. Where does it explain how to do this? Where does it explain the effects of team roles on what users can and cannot do on a team - or is that simply something I am expected to handle?

I feel like I am simply missing some of the documentation.


16 Oct
2 years ago

joshuaf started a new conversation Single Page Angular App In Laravel - Setup


I want to set up my site with a few non angular pages like the landing page, the login, info etc. The bulk of the app will be contained in a single page angular app. For development, I have been serving the app with gulp. Now, I have built a deployment version of the code and I need to know where the put it in the laravel folder structure, how to set up the routes to point to it correctly, and anything else I might have missed.

As a result of the build, I have an index.html, an app.js, a vendor.js, and some map files and the css.


23 Sep
2 years ago

joshuaf started a new conversation Ajax Requests In Homestead

I am building an angular app with laravel on the server side. I am using homestead for some testing and serving the app with gulp. I would like to make some ajax requests to the postgres databases. I need to know the correct way of making these requests.

As of now, using the URL of results in an error. Using the IP address of /functionName works in the URL but gets the cross site security issue in the ajax call. I have tried using some extensions for CORS, but that hasn't worked. Using a call like ./functionName obviously results in the same problem.

Surely I am not the first person to come across this issue. Any help is appreciated.