jlrdw

Experience

223,660

249 Best Reply Awards

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

25th April, 2018

jlrdw left a reply on Does Downloading A File From Server Consumes VPS Bandwidth? • 4 hours ago

Yes downloads is bandwidth usage.

jlrdw left a reply on My Model Is Pulling The Same Data Three Times Instead Of Looping Properly. • 4 hours ago

Then you probably need a count loop where

  • First pass is for one connection, credentials
  • Second pass is for another connection, credentials etc

jlrdw left a reply on Deploying A Laravel Application To DreamHost Shared Hosting • 4 hours ago

A suggestion, perhaps redo parts and let folks know the importance of main laravel being placed above webroot (htdocs, public_html). Here is an excellent guide that works:

http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/

Can be used also to setup development correctly in wamp, etc.

Folder structure example on a typical host: https://imgur.com/Oo6k4Fp

Honest, thanks for the guide, but I highly suggest a tweak or two for a proper install.

jlrdw left a reply on Make A Foreach With A JSON Array • 4 hours ago

No No that was an example of a string function, use what @Cronix said json-decode

Sorry for confusion.

jlrdw left a reply on Union With Pagination - Laravel 5.6 • 4 hours ago

You need to use the length aware paginator (custom) see here: https://laracasts.com/discuss/channels/tips/length-aware-paginator

Another article and case stydy: https://christophersax.com/2016/custom-lengthawarepaginator-in-laravel/

jlrdw left a reply on Cant Understand Eloquent Distinct • 4 hours ago

It in a way doesn't make sense to do first names only like @spekkionu said:

Say you have a "John Doe" and a "John Smith".

But he basic distinct is:

SomeModel::distinct()->get(['The_column']);

You probably need to get at least first and last name. I rarely need distinct.

Look at this best answer: https://laracasts.com/discuss/channels/eloquent/select-specific-columns-using-eloquent-orm

You can have many clauses and conditions in eloquent or query builder.

jlrdw left a reply on Question About Search In Eloquent • 6 hours ago

It will be a name =

jlrdw left a reply on My Model Is Pulling The Same Data Three Times Instead Of Looping Properly. • 7 hours ago

print_r at different stages, somehow in loop it must be getting same server or rets. Make sure any Loop is setup correctly, temp Loop a count or something.

jlrdw left a reply on My Model Is Pulling The Same Data Three Times Instead Of Looping Properly. • 10 hours ago

Make sure you clear all cache and view cache between each code change. All cache.

jlrdw left a reply on My Model Is Pulling The Same Data Three Times Instead Of Looping Properly. • 10 hours ago

First, I'm a beginner and an idiot

No you are not at least you are trying and have posted some code unlike some folks are just ask how do I do this and don't even try so Bravo for trying.

If three different servers I may be wrong or missed something but are you sure three different server connections are being passed correctly?

jlrdw left a reply on Stripe Slow • 11 hours ago

What are you considering slow.

jlrdw left a reply on How Should I Do My Project • 11 hours ago

Is this a school project? Because you didn't ask anything about securing a customer's credit card information.

jlrdw left a reply on What Things Can Cause A Memory Leak In A Laravel Project? • 12 hours ago

Remember however there is a difference in a memory leak which could be a bug versus eating up too much memory.

jlrdw left a reply on What Things Can Cause A Memory Leak In A Laravel Project? • 13 hours ago

I have seen where MySQL has had memory leaks in the past, again check issues of any package you desire.

jlrdw left a reply on What Things Can Cause A Memory Leak In A Laravel Project? • 14 hours ago

One thing to check is your PHP version, the exact build and check any issues.

jlrdw left a reply on Make A Foreach With A JSON Array • 15 hours ago

@Dev0ps of course you could write your own code to foreach over anything, but would require a lot of special string functions to just get the data. As example

<?php

namespace App\Helpers;

class DBS
{

    public static function __callStatic($method, $params)
    {
        $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
        
        if (isset($trace[1]['class'])) {
            $class = $trace[1]['class'];
            $slh = strrpos($class, "\") + 1;
        } else {
            return null;
        }
        $model = "\App\Models\SMVC" . "\" . substr($class, $slh, -10) . "Model";
        $instance = new $model();

        return call_user_func_array(array($instance, $method), $params);
    }

}

A special function to figure out which class did the call.

Notice mhe

$slh = strrpos($class, "\") + 1;

But why when PHP has the nice json_decode built in.

jlrdw left a reply on Unclear Documentation • 15 hours ago

You stated

This is an issue regarding the documentation

If you feel there is a documentation error, let Taylor know with a pull request. This site is Jeffrey's.

jlrdw left a reply on Make A Foreach With A JSON Array • 16 hours ago

Are you series, there is an example in the given link of a foreach loop.

jlrdw left a reply on How To Redirect The User To A Specific Page If He Click In The Browser Back Button? • 16 hours ago

@adamjhn if you go with any ajax, watch out for cached pages, they can mess things up sometimes.

jlrdw left a reply on How To Redirect The User To A Specific Page If He Click In The Browser Back Button? • 16 hours ago

@Cronix

Another (probably better) way around this it to use modals and ajax for your forms

Good answer, I am getting ready (popcorn) for another 4 or 5 page discussion on the how do I do that with ajax.

@adamjhn just kidding with @Cronix here. By all means post what you tried, and if doesn't work of course there is help.

jlrdw left a reply on Closing Tab • 16 hours ago

To followup on this, there are many youtube videos on jquery and javascript that does neat things like this. It would be a good idea to actually learn some of this stuff on your own, then if trying something and you get stuck post code you tried and ask.

A lot of the neat stuff is just some basic css also. Css would also be good to learn, actually manually apply some for practice, no library, it will make you more well rounded.

https://www.w3schools.com/Css/

jlrdw left a reply on Can't Turn An Object Into An Array. • 17 hours ago

It is just


$whatever = $row->whatever;

// Instead of

$whatever = $row->['whatever'];

24th April, 2018

jlrdw left a reply on Closing Tab • 1 day ago

A divorce.

jlrdw left a reply on How To Separate Frontend And Backend Completely? • 1 day ago

Doesn't node.js directly work with apis.

jlrdw left a reply on Image Upload Using Laravel And Ajax. • 1 day ago

I typed in upload image with Ajax and some Answered results came up.

jlrdw left a reply on Ajax Call With Laravel Form • 1 day ago

I am not on desktop now but if you search a while back someone ask about upload with Ajax and there was a pretty good answer.

jlrdw left a reply on WebSite Hosting Service • 1 day ago

None of these give you an idea https://laracasts.com/discuss?q=Hosting

jlrdw left a reply on Cannot Update My Data From My Edit From • 1 day ago

Well was a csrf token ever added in?

jlrdw left a reply on Cannot Update My Data From My Edit From • 1 day ago

Clear browser cache and temp view files in between each changing code.

jlrdw left a reply on Cannot Update My Data From My Edit From • 1 day ago

Put in the columns that's editable in model.

jlrdw left a reply on Page Flickers On Initial Call, On Apache And IIS • 1 day ago

I see that on a lot of sites anymore people overuse the JS CSS libraries and things can't stay caught up. I keep trying to tell people only use JavaScript only pages that absolutely needed and only loaded for that page as needed Just my two cents.

jlrdw left a reply on Get Array Index • 1 day ago

I really mis-understood original question, sorry.

jlrdw left a reply on Query Slow In Datatable • 1 day ago

@m-rk I meant Google as an example, could be https://laracasts.com/discuss or any site. I meant google has large results and google paginates results.

Any developer, by time they get to the point of using laravel, should fully realize large result sets need pagination.

jlrdw left a reply on Get Array Index • 1 day ago

$name = $arrayname['name'][0]; $name = $arrayname['name'][1];

jlrdw left a reply on Godaddy Hosting Is Good For Big Laravel Projects • 1 day ago

You are not going to achieve a Fedex size site there, but for medium to smaller sites it's okay. But if you expect thousands of users probably not.

But why don't you do something:

  • Call them
  • Ask about dedicated server and see what it will do
  • They have tech support for this type of question

Their shared hosting is only good for smaller sites where you don't expect large number of hits on site.

I have one site on their shared host, but it's for a non profit in a smaller city. I have never had an issue.

jlrdw left a reply on Query Slow In Datatable • 1 day ago

What else would you expect to happen?

23rd April, 2018

jlrdw left a reply on ResetPassword.php Questions • 2 days ago

Do not modify files under vendor there's an artisian commant to make Auth. It is setup to use a trait to change or put in what's needed.

You may want to re-read docs on it and perhaps view a video or to on authentication.

jlrdw left a reply on Slow MySQL Query With Laravel Eloquent • 2 days ago

Your query is doing a count and checking if 2 other selects ......

Was written by a true wise man. I get frost bites when I read an answer from him.

You were gone for a while I truly missed our little chats. Of course nice chats only now.

I hope you are doing well.

jlrdw left a reply on Stripe Requests Are Taking More Than 4 Seconds In 3G Network • 2 days ago

Not just this https://daveismyname.blog/stripe-api-format-invoices-totals but search around in David's blog he has several stripe tutorials. See if any talk about speed of transaction, that sort of thing.

He is also a developer of a php framework where I also wrote some of the code. A while back however.

jlrdw left a reply on Stripe Requests Are Taking More Than 4 Seconds In 3G Network • 2 days ago

In 4 seconds, would they have time to watch a movie with popcorn and soda.

jlrdw left a reply on Filters Some Collection Object • 2 days ago

if the count of users increases significantly

How significant, if a bunch would you want to add in paginated results?

jlrdw left a reply on Stripe Requests Are Taking More Than 4 Seconds In 3G Network • 2 days ago

I wish my cell phone and plan was that fast. For work we use an at&t plan, even with no wifi it is fast. But my personal phone through bo??? mobile the same thing would take 15 seconds, a guess and it is 4g.

So have you actually tested this on other phones and plans.

To me 4 seconds in blazingly fast.

Everything online doesn't take place in one millisecond you know.

jlrdw left a reply on Eloquent Typecasting To Nvarchar(4000) • 2 days ago

And if regular PDO works just use regular PDO. Eloquent is not a cure-all for everything. You probably already know about laravels instance to PDO, getPdo (). Good luck.

jlrdw left a reply on Auth Credential With Roles • 2 days ago

See my answer here I point to one of Jeffrey's videos https://laracasts.com/discuss/channels/laravel/confusion-about-gates-and-policies

jlrdw left a reply on Eloquent Typecasting To Nvarchar(4000) • 2 days ago

Just me, but for sql server I'd use asp.net razor with c#

I had things like a varaible passed in querystring for example and in c# you have to cast it:

myvar = Convert.ToDouble(pg);

But I don't understand your situation, just try and use a datatype that will work correctly. Or work with a string (if possible) then cast.

I have always looked at life like:

c# goes with sql server 
php goes with mysql
java goes goes with any supported database, but mysql or sap is a good marriage.

Ok enough of my thoughts on this.

jlrdw left a reply on Make A Join Request • 2 days ago

Not exact laravel convention here but you could start off with table similar to (name all correctly) just typed quickly:

user table 

id
username
// more fields as needed
coins table

id
coin
coin_trade_table

user_id 
coin_for_trade_id
coin_sought_id
// other fields as needed

User can fill out coin_trade_table via dropdown or even a lookup table (depending on size of coin table)

Start off with perhaps a group by on coin_for_trade_id and coin_sought_id with order by user_id

Just my suggestion here for starters.

But look over relations in docs and work the examples if using eloquent.

jlrdw left a reply on Have Multiple Users To One Account • 2 days ago

Also do a good search for Multi-Tenant applications, you will learn a lot more.

Edit Your Profile
Update

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