vmitchell85

vmitchell85

Member Since 3 Years Ago

Columbus, OH

Senior Consultant at Result Data

Experience Points 20,350
Experience Level 5

4,650 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 127
Lessons
Completed
Best Reply Awards 11
Best Reply
Awards
  • 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

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    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.

07 Dec
6 months ago

vmitchell85 left a reply on Authorization Timeout When Using Gates/Bouncer

Turns out it was a Policy causing the issue, nothing to do with bouncer at all.

30 Nov
6 months ago

vmitchell85 left a reply on Stuck: Need Help With Terminology, Multiple External API

The Laravel Socialite code might be of use for reference: https://github.com/laravel/socialite

vmitchell85 left a reply on Stuck: Need Help With Terminology, Multiple External API

Not sure if there is better terminology but you'll probably want a contract and a number of other classes that implement this contract.

The contract will specify the specific functions that the other classes must have and you can then do the specific logic for each API in those classes.

Hope this helps.

vmitchell85 left a reply on Authorization Timeout When Using Gates/Bouncer

It seems when I attempt to check using App\User::class if times out, but if I use User::class it works just fine.

Given that the check needs to be in a blade view (with the current setup) I can't import the User class.

After some further troubleshooting and trying to come up with a workaround I got something working...

I created a helpers.php file and auto-loaded it with a function that helps with checking authorization:

if (!function_exists('can')) {
    function can($action, $class)
    {
        if (!auth()->check()) {
            return false;
        }

        if ($class == 'User::class') {
            $class = config('auth.providers.users.model');
        }

        return auth()->user()->can($action, $class);
    }
}

Still open for better / new ideas...

vmitchell85 left a reply on Escaping {{ In VueJS

It helps... I think I'll try to mock something up on my end and see what I can come up with...

vmitchell85 left a reply on Escaping {{ In VueJS

v-html should just be outputting the value as html in the element, and v-pre should be ignoring the content.

Does it not work? does a {{ throw an error? display incorrectly?

vmitchell85 left a reply on Escaping {{ In VueJS

Going to post this here instead of the other thread.

Can you try something like this:

<div v-pre v-html="my_function"></div>

vmitchell85 left a reply on Spark - Implementing Email Verification

I suspect it should be SparkServiceProvider instead of SparkServerProvider. The only other thing to ensure is that you are running Spark 7.1 and not 7.0.

Other than that it should work just as the documentation states.

vmitchell85 left a reply on How To Throw And Error In Laravel And Catch It With Axios

It should go to your catch function if it's not a 200 level response.

Do you have sample php and axios code you can share?

vmitchell85 left a reply on Escaping {{ In VueJS

Just posted this on another thread... but...

Would v-pre work for you? Looks like you just add v-pre to an element and Vue should ignore everything within it:

https://012.vuejs.org/api/directives.html#v-pre

vmitchell85 left a reply on Escape {{ }} In Vue (2.0)

Would v-pre work for you? Looks like you just add v-pre to an element and Vue should ignore everything within it:

https://012.vuejs.org/api/directives.html#v-pre

vmitchell85 started a new conversation Authorization Timeout When Using Gates/Bouncer

My Setup:

  • Laravel 5.7
  • Bouncer
  • Developing a composer package

I'm having some odd behavior where an authorization check takes way too long to come back which results in a max execution time error. This check works just fine on the user with an id of 1 but when I check for user id 2 it times out.

Here is the original code from the blade file (in the composer package):

@if (auth()->user()->can('read', \App\User::class))
                <a href="{{route('my-package::users.index')}}" class="py-2 no-underline text-grey-light">Users</a>
            @endif

I ran it in tinker to see if it would do the same thing and it does: https://d.pr/i/j6jx1D

Thanks in advance for any tips or answers.

13 Nov
7 months ago

vmitchell85 left a reply on Display Result Of Artisan Command Executed Via Controller

You can get the output of the command using Artisan::output() after your Artisan::call();

vmitchell85 left a reply on Issue With Vue's Dinamic Component

The documentation for Vue indicates dynamic components should be defined this way:

<component v-bind:is="currentTabComponent"></component>

Try changing <dinamic-component :is="activePanel"></dinamic-component> to <component :is="activePanel"></component>

05 Oct
8 months ago

vmitchell85 left a reply on VSTS For Deployment

I'm trying to figure out my own build process now... if you have any insight or would like to combine efforts (even though it was 8 months ago) hit me up... @vmitchell85 on twitter too.

24 Aug
10 months ago

vmitchell85 left a reply on Nova Login

I think you have to create a user account for nova... though you don't need to run make:auth as long as you have the users migration still.

Just run php artisan nova:user and it'll let you create a user to use with Nova.

20 Mar
1 year ago

vmitchell85 left a reply on How Do I Save Multiple Value Of A Fillable Table Into My Database

Did you get an error message? Posting that would probably be helpful.

It's hard for me to help when I can't verify what is happening.

My first troubleshooting step would be to add dd($leads); after the foreach($request->all() as $leads => $value) { line and see what the output is.

If you'd like to have a more 1-on-1 chat I'm on larachat Slack as vmitchell85

vmitchell85 left a reply on How Do I Save Multiple Value Of A Fillable Table Into My Database

$number is parsing the value that you use on the rows and then looking for those specific fields once we know there is a nameX field available.

The first run it will find a field that is name0, then it'll create a new Lead with all the gender0/age0/name0 values. Next it'll find name1 and it'll create a Lead with the gender1/age1/name1 values.

vmitchell85 left a reply on Port 80 Getting Added To URLs After POST

@WallyJ Sorry... I missed your reply

I also found this: https://laracasts.com/discuss/channels/general-discussion/redirectroute-adds-80-to-url-causes-error

Are you returning a redirect in this instance and not in the other Form instance you mentioned?

vmitchell85 left a reply on How Do I Save Multiple Value Of A Fillable Table Into My Database

Okay... so you're adding rows (and fields) dynamically and need to save all of them correct?

I've done this before by changing the names when you add a row (which it looks like you're doing) and then looping through the fields (which is what you're asking).

I think you'll need a FormRequest for the validation as it'll be a lot of logic to put into the controller. However in the controller you should be able to run something like this:

foreach($request->all() as $label => $value) {
    if (starts_with('name', $label)) {
        $number = str_after('name', $label);

        $leads=new Lead();
        $leads->student_name = $request->input('name' . $number);
        $leads->gender = $request->input('gender' . $number);
        $leads->age = $request->input('age' . $number);
        $leads->save();
    }
}

Can't be 100% positive it'll work but let me know and I'll keep trying to help.

vmitchell85 left a reply on Why I Am Sending Email To Myself ?

It seems you're asking how to send the email to yourself and the user?

The $message->to() function can take an array of email addresses. That way the email will go to your user as well as you.

vmitchell85 left a reply on How Do I Save Multiple Value Of A Fillable Table Into My Database

I'm not sure I'm 100% knowing what you're trying to do but it seems you may need to wrap the table in a <form> and do a POST to the route for your controller.

vmitchell85 left a reply on How To Get The 'id' Of Any Paid Plan Anywhere In A Class?

sorry for the delay... I wish email notifications worked automatically on here...

Laravel\Spark\Spark::actovePlans() should return all the active plans.

05 Mar
1 year ago

vmitchell85 left a reply on Horizon + Heroku

? Not sure about that one.

vmitchell85 left a reply on Stripe Plan Upgrade Problem

Without an example of your code I'm not sure this will be helpful. Though I'll try to provide some tips:

When changing plans you should use:

$user->subscription('main')->swap('provider-plan-id');

See https://laravel.com/docs/5.2/billing#changing-plans

vmitchell85 left a reply on AMP - Accelerated Mobile Pages

You can find more info about AMP at https://www.ampproject.org.

There are some resources on the site and Laravel packages to help with it: https://github.com/wearejust/laravel-amp

The idea is that you strip down a page so it loads faster.

This article is a good recap: https://neilpatel.com/blog/the-definitive-guide-to-accelerated-mobile-pages-amp/

vmitchell85 left a reply on Laravel 5.3 Mailable Host Settings

Do you need to change the SMTP server settings or just the from address to match the user?

If just the from address you can set that when you send the emails:

https://laravel.com/docs/5.6/mail#writing-mailables

vmitchell85 left a reply on Horizon + Heroku

Have you setup your horizon.php config file with all the workers?

vmitchell85 left a reply on Insert Into Polygon

Your code seems to be:

$test = new Tests();
$test->delemitation = st_geomfromtext('polygon ((10.02 20.01, 11.92 35.64, 25.02 34.15, 19.15 33.94, 10.02 20.01))', 4326);

When you are calling st_geomfromtext it's looking for that function in the local file and it cannot find that function.

st_geomfromtext seems to be an SQL operation, so you'll need to have that in quotes or use DB::raw() for some of that interaction.

vmitchell85 left a reply on [Blade] Check If There's Something In A Stack

It seems that having a section might work better for this scenario.

That way every time you specify the section it would overwrite the previous definition.

See: https://github.com/laravel/framework/issues/11704

vmitchell85 left a reply on Is Laravel Suitable For System Like Management System Or Similar System?

Laravel can definitely do all of this. Fingerprint readers will probably store the data as an image or a string of text (text seems to be more likely).

As for reporting there are packages that can help with this:

https://github.com/Jimmy-JS/laravel-report-generator

vmitchell85 left a reply on Laravel Spark, Laravel Forge, Digital Ocean, Putty Public And Private Keys And SSH Into Server

You'll need to upload your public SSH key into Forge. Once you do that Forge will install your key onto the server for you.

After that is complete you can SSH using your privatekey from your local machine to the server.

As @ejdelmonico mentioned you probably will never need to use the Digital Ocean console.

vmitchell85 left a reply on Converting To Php 7.

You'd have to check all your other dependancies to see if PHP 7.1 will work with them. If this is a new project then you'd probably be okay.

We'd need a lot more information to advise properly though.

vmitchell85 left a reply on Laravel 5.5 Basic Auth Problem - Laravel Authenticates Users Without A Password

My first suspicion is that there is a conflict somewhere since you're using login as the field name.

I'll spin up a new project, and test it out also... but in the meantime maybe try changing the field to username or something similar.

vmitchell85 left a reply on How To Get The 'id' Of Any Paid Plan Anywhere In A Class?

I don't think I know exactly what your use case is, but there are a few methods on the ManagesAvailablePlans trait on the Laravel\Spark\Spark class that you might be able to use.

Check out these:

  • activePlans
  • activePlanIds
  • activeTeamPlans
  • activeTeamPlanIds

vmitchell85 left a reply on Update If User Read The Post

To recap your question:

You're looking to monitor where a user is on a page and if the user is on a specific place on the page for more than 10 seconds you want to make an ajax call to store some data regarding that post/spot on the page?

I think a combination of the HTML Intersection Observer API and a setTimeout would work for this.

HTML Intersection Observer API details can be found here: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API

However this is an new/upcoming feature in browsers so the support isn't great. There does seem to be a polyfill though: https://github.com/w3c/IntersectionObserver/tree/master/polyfill

vmitchell85 left a reply on Dynamic Loading Of Data - Vuejs

I'm no JS pro, but I think you can conditionally load the file using require instead.

See this example of the syntax difference: http://voidcanvas.com/import-vs-require/

vmitchell85 left a reply on Authentication With G Suite (Google Apps)

I created an application with similar requirements using Socialite and adding a check on the email address to ensure it matched the domain.

I put the following check before creating the user in the Laravel database.

if( substr($user->email, -14) != 'yourdomain.com' )
        {
            abort(403, 'Unauthorized');
        }

vmitchell85 left a reply on Using PHP Functions In View

If you're wanting to call the function from your blade file that would only be possible if it's a global helper. This article explains how to do that: https://stackoverflow.com/questions/32419619/how-do-i-make-global-helper-functions-in-laravel-5

The other option is to transform the data and send it to the view as a separate parameter.

19 Jan
1 year ago

vmitchell85 left a reply on Best Way To Counting SLA Times

You could probably do some calculation from the created_at date of the ticket. Any time you view the ticket you could update a viewed_at timestamp or something similar.

Hope this makes sense.

vmitchell85 left a reply on Laravel 5.4 New Site , No Internet , Styles Of Form Is Only Default Html

You can download any files and place in them into the public directory. Once you've done that you can link the files in your layout blade file.

vmitchell85 left a reply on How Can I Uninstall Laravel-mix Completely From 5.5 ?

I ran npm remove laravel-mix and it seemed to work fine to remove it from package.json

17 Oct
1 year ago

vmitchell85 left a reply on Question About Teams And Subscriptions

Yeah, that is how team billing works... if you're invited to a team you don't pay... the owner of the team pays.

12 Oct
1 year ago

vmitchell85 left a reply on Question About Teams And Subscriptions

I assume you mean being able to purchase a set of 5 teams for a certain price? If so, I'm not sure how to do that.

vmitchell85 left a reply on Spark And Team Billing Vs Account Billing

The dillinghamio gist mentioned changes the number of subscriptions that the team has.

So 1 subscription(user) would be $10 and every time a user is added or removed the quantity is updated.

Here is the updateQuantity method:

    /**
     * Update the quantity of the subscription.
     *
     * @param  int  $quantity
     * @param  \Stripe\Customer|null  $customer
     * @return $this
     */
    public function updateQuantity($quantity, $customer = null)
    {
        $subscription = $this->asStripeSubscription();

        $subscription->quantity = $quantity;

        $subscription->prorate = $this->prorate;

        $subscription->save();

        $this->quantity = $quantity;

        $this->save();

        return $this;
    }

Hopefully this makes sense for your use cases.

vmitchell85 left a reply on Add Additional Name Field In Laravel Spark Update Member Modal

I think you need to swap method implementations not class implementations.

So it would possibly be Spark::swap('[email protected]', 'App\Swap\[email protected]');

vmitchell85 left a reply on Question About Teams And Subscriptions

I think the way to do this is TeamBilling. The team is the one who pays, the user doesn't, and you can set the maximum number of members to the team.

Have you tried to set this up already? If you're waiting to purchase to confirm I can spin up a test site and confirm.

vmitchell85 left a reply on Blank Pdf

Have you tried to use the response method?

return response()->download($pathToFile);

return response()->download($pathToFile, $name, $headers);

return response()->download($pathToFile)->deleteFileAfterSend(true);

https://laravel.com/docs/5.5/responses#file-downloads