vmitchell85

Experience

9,000

9 Best Reply Awards

  • Member Since 2 Years Ago
  • 27 Lessons Completed
  • 0 Favorites

20th March, 2018

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

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 • 1 month ago

$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 • 1 month ago

@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 • 1 month ago

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 ? • 1 month ago

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 • 1 month ago

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 Update If User Read The Post • 1 month ago

@devops here is some info on Intersection Observer: https://alligator.io/js/intersection-observer/

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

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

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

5th March, 2018

vmitchell85 left a reply on Horizon + Heroku • 1 month ago

? Not sure about that one.

vmitchell85 left a reply on Stripe Plan Upgrade Problem • 1 month ago

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 • 1 month ago

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 • 1 month ago

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 • 1 month ago

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

vmitchell85 left a reply on Insert Into Polygon • 1 month ago

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 • 1 month ago

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? • 1 month ago

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 • 1 month ago

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. • 1 month ago

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 • 1 month ago

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? • 1 month ago

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 • 1 month ago

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 • 1 month ago

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) • 1 month ago

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 • 1 month ago

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.

19th January, 2018

vmitchell85 left a reply on Best Way To Counting SLA Times • 3 months ago

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 • 3 months ago

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 ? • 3 months ago

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

17th October, 2017

vmitchell85 left a reply on Question About Teams And Subscriptions • 6 months ago

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

12th October, 2017

vmitchell85 left a reply on Question About Teams And Subscriptions • 6 months ago

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 • 6 months ago

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 • 6 months ago

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 • 6 months ago

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 • 6 months ago

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

vmitchell85 left a reply on This.$nextTick Not Working The Way Expected • 6 months ago

Definitely a timing issue... have you tried to separate the calls in the $nextTick()?

Like this? Might not make any difference in this case, but I have had similar issues resolved this way.

this.$nextTick(() => {
    $(".country_region").dropdown("set selected", this.form.country_region_id);
    $(".country_region").dropdown("refresh");
});

vmitchell85 left a reply on Sidebar Component Changes It's Order In The Dom Tree In Specific Situation • 6 months ago

You've probably already checked this... but have you ensured all your HTML tags in those components are properly closed? I've has some very odd things happen when I've missed one.

vmitchell85 left a reply on Paginate Output Rows Based On The User Selection. • 6 months ago

you'll need to pass the selected rows to your controller... so your vue fetch method will need to send a value over. Then in your controller you'll need to pass that to the paginate function...

Controller

public function fetchCategory()
{
    return Category::orderBy('id', 'desc')->paginate(request()->row_count);
}

The row drop down will need to either be in the Categories.vue file or pass it's value as a prop... and then in the fetch method you'll need to send the value...

fetch(page) {
    axios.get(this.url(page), { row_count: this.row_count })
    .then(this.refresh);
},

I think this will get you on the right track... let me know if you need more help...

21st April, 2017

vmitchell85 left a reply on Permission Denied - Laravel 5.2 - Vagrant • 1 year ago

Sorry, no idea

20th April, 2017

vmitchell85 left a reply on Permission Denied - Laravel 5.2 - Vagrant • 1 year ago

It seems you're using file based sessions and auth requires the session files. Since you cannot access the files for some reason that is why commenting that out works, since you don't need auth anymore for those routes.

vmitchell85 left a reply on Sending Email After Specific Date • 1 year ago

@sandstorm you'll need to change the path.

php /path/to/artisan the path to artisan is the path to the directory your application is in... so it might be something like php /var/www/myapp/artisan

19th April, 2017

vmitchell85 left a reply on Permission Denied - Laravel 5.2 - Vagrant • 1 year ago

I'm out of ideas... If you can I would suggest destroying the vagrant box, downloading the latest Homestead again.

Sorry I couldn't be of more assistance.

vmitchell85 left a reply on Permission Denied - Laravel 5.2 - Vagrant • 1 year ago

does the /home/vagrant/sites/inventory/storage/framework/sessions/ folder exist? what are the permissions on that folder if it does exist

vmitchell85 left a reply on Permission Denied - Laravel 5.2 - Vagrant • 1 year ago

Can you post the full error please

vmitchell85 left a reply on Permission Denied - Laravel 5.2 - Vagrant • 1 year ago

The stack overflow thing you posted is irrelevant. You're developing on a dev machine so you generally don't need to work about permissions right now. When you deploy your code online then you'll need correct permissions. Having 777 right now is fine.

I want to know exactly what you are doing to get the error. Are you running a command on the vagrant box? Are you trying to load a url in the browser? What exactly are you doing to make the error show up?

vmitchell85 left a reply on Permission Denied - Laravel 5.2 - Vagrant • 1 year ago

What are you doing when you get the error?

vmitchell85 left a reply on Permission Denied - Laravel 5.2 - Vagrant • 1 year ago

Running chmod 777 on any directory gives the directory owner, group, and everyone read/write/execute access... this means if you've ran it with 777 then everyone has read/write/execute access.

So, even though it says "permission denied" it might be something else contributing to it.

If you run ls -l in your main application directory does it show drwxrwxrwx for your storage and bootstrap directories?

vmitchell85 left a reply on Permission Denied - Laravel 5.2 - Vagrant • 1 year ago

The permissions changes should always be on the Vagrant machine, since that is where the app is running.

Is there any additional info in the error message?

vmitchell85 left a reply on Permission Denied - Laravel 5.2 - Vagrant • 1 year ago

Did you run php artisan key:generate to populate the APP_KEY in your .env file? Found a similar post that states that may be the issue.

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.