jlrdw

Experience

125,290

135 Best Reply Awards

  • Member Since 1 Year Ago
  • 42 Lessons Completed
  • 0 Favorites

26th March, 2017

jlrdw left a reply on How Groundbreaking Or Polished Should My Project Be To Include My Github Profile On My Resume? • 5 hours ago

I wouldn't say groundbreaking, as long as you have a good appearance, user-friendly, you should be good to go. The code just comment and format it properly.

jlrdw left a reply on How To Handle Big Database Queries With Pagination In Laravel 5 • 7 hours ago

When you use built-in pagination it retrieves only the 20 at a time in the database, like limit in mysql. They're articles on stack Overflow articles covering efficient pagination with a large result sets, as even the limit clause. can start bogging down.

I'd break this down into newer post and have another section for all the post say over a year having a separate table with a link if you user wants to go there. That's just a suggestion.

jlrdw left a reply on Which Is Better For Laravel (Vue Or AngularJs) ? • 11 hours ago

Like laravel, there is a learning curve, but Jeffrey has a video series.

jlrdw left a reply on Best Approach For Dynamic Views • 11 hours ago

Since dynamic and often change, have you considered data tables https://datatables.net/

jlrdw left a reply on Best Approach For Dynamic Views • 12 hours ago

What prevents it changing for ajax?

jlrdw left a reply on Which Is Better For Laravel (Vue Or AngularJs) ? • 12 hours ago

Wouldn't that be like asking 10,000 people which is better Coke or Pepsi. Most laravel folks will probably lean to Vue.

jlrdw left a reply on Issue In Caching • 12 hours ago

You probably need to explain in better detail and show code so someone can try to help.

jlrdw left a reply on Paginate Blog Example From "Laravel 5.4 From Scratch Series" • 14 hours ago

@hillcow I don't know if it's possible to un-mark, so you may want to start a new post.

jlrdw left a reply on Unique For Nullable Attribute • 14 hours ago

In you validation, this is from docs

'publish_at' => 'nullable|date',

example only.

jlrdw left a reply on How To Only Process And Render A Partial View When Request Is Ajax. • 15 hours ago

and for a non-ajax request I want the full page.

Not 100% sure I understand, but the ajax results are normally placed in a div. But look into how @include works (in the docs) for non ajax.

jlrdw left a reply on Why Am I Finding It Difficult To Use A Framework? • 15 hours ago

The same reason some new intern doctor's may find it difficult, thinking of too much at one time. You finally start learning when:

  • First you realize it will take time
  • You learn one thing at a time (don't cram too much in)
  • Learn well, if confused, repeat, overview, til you know it.

I remember way back when I was learning HTML, I was lost. Years later I can write out all code for any layout, even envision in my head as I am doing.

Bottom line, DON'T rush, remember it takes time to learn correctly.

25th March, 2017

jlrdw left a reply on What's The Difference Between @include And @yield???? • 1 day ago

@include is for including another whole view within a view.

@yield is content for that the view, say a table in a div.

jlrdw left a reply on Does Eloquent Prepare The Output Of The Data In The Collection When Relationships Are Eager Loaded? • 1 day ago

The

User::with('roles')->get()

generates two queries, no different than something like

select * from user where userid = 1;

and second query

select * from roles where userid = 1;

of course field names are example only.

In fact, I forget the video, but Jeffrey explains how a one to many reduces down to two queries.

jlrdw left a reply on Does Eloquent Prepare The Output Of The Data In The Collection When Relationships Are Eager Loaded? • 1 day ago

@Ruffles the ORM has all query builder methods. But handling relations (the way it does) and querybuilder joins are two different worlds. Querybuilder alone is more like writing regular queries (in a way). Orm and querybuilder overlap on some things.

jlrdw left a reply on Storing User's Date Of Birth As A Timestamp Object? • 1 day ago

What if it's an older user?

jlrdw left a reply on Adding Multiple Records To A Database At Once • 1 day ago

First get yourself familiar with dynamically adding a row using whatever javascript library you plan on using. But be warned javascript is not turned on on all browsers. Next try yourself, and when you have question show here the question with your code properly formatted.

Unless t-- decides to write out whole thing for you.

jlrdw left a reply on Should I Use Event Or Notification? • 1 day ago

@vipin93 See if textlocal tech support can assist, but if it's something that works in php, it would work in laravel, hopefully it's integration friendly.

jlrdw left a reply on Should I Use Event Or Notification? • 1 day ago

Haven't used, but is this the same https://packagist.org/packages/tzsk/sms

jlrdw left a reply on AJAX Post Requests Cause Token Mismatch Because The CSRF Token Changes. • 1 day ago

Make sure token has a name, and in that thread you see

$post._token = document.getElementsByName("_token")[0].value

if you are constantly repeating ajax request the server needs time to catch up, by using document.getElementsByName you are retrieving correct token for that request.

Slow down the rate you are performing ajax request.

jlrdw left a reply on Server Timezone • 1 day ago

West Africa

jlrdw left a reply on AJAX Post Requests Cause Token Mismatch Because The CSRF Token Changes. • 1 day ago

That thread is talking about POST as well.

jlrdw left a reply on Laravel RAM Usage Problem • 1 day ago

@bradbforbes you can't use Facebook as a comparison, they have experts who use compiled c++ classes for some stuff. and a compiled c++ class will not consume as much memory. I wish I knew some of that. But you are correct, experts.

jlrdw left a reply on Getting Null Value In FormData In Vue.js • 1 day ago

Please edit and cleanup, surround code with 3 backticks "```" without the apostrophes.

24th March, 2017

jlrdw left a reply on Image Doesn,t Load On Mobile Browsers • 2 days ago

Well, there is mobile detect software where by you could display image smaller if mobile. But images should be optimized for web / mobile. Also in your css / bootstrap there are ways to deal with a desktop and mobile site at same time, called media queries, look up mobile detect software, and media queries.

jlrdw left a reply on Image Doesn,t Load On Mobile Browsers • 2 days ago

i see it is the side that is effecting it sir

What do you mean?

jlrdw left a reply on Database Fields: Nullable Or Not? • 2 days ago

Yes and no, it's two sided, on one had a possible performance hit in a query. Some complex queries and grouping mixed with nulls don't get along. That's why if I know I will use a complex query I have a 0.00 instead of null. When dealing with numbers I have just found I don't like null. But date field null is what I want. Varchar I could care less.

jlrdw left a reply on Image Doesn,t Load On Mobile Browsers • 2 days ago

Can you do a temp view that only has

 <img src="images/2.jpg" alt="" /> 

of course the body, and see what happens

jlrdw left a reply on Image Doesn,t Load On Mobile Browsers • 2 days ago

does work?

jlrdw left a reply on Image Doesn,t Load On Mobile Browsers • 2 days ago

Some code?

jlrdw left a reply on Database Fields: Nullable Or Not? • 2 days ago

@intrepidws bottom line is who gives a blank? Like I said there are times I want a null, times I don't, so wouldn't it be up to the developer? Each use case is different.

jlrdw left a reply on Splitting One Table Into Two Tables • 2 days ago

Use an insert with a select, using a regular query.

jlrdw left a reply on How To Store Status Of A Model In Database, As Enum Or As Integer? • 2 days ago

I have seen many problems with enum, google it and read some of the stackoverflow post yourself.

jlrdw left a reply on Image Doesn,t Load On Mobile Browsers • 2 days ago

Some code would help us help you, also have you checked more than one mobile, have you tried without the www?

jlrdw left a reply on Vue Dropdown Impossible? • 2 days ago

23rd March, 2017

jlrdw left a reply on Uploading Images To The `public` Directory Stops Working After The First Image Is Uploaded • 3 days ago

Just make sure you get paths right, and permissions are right.

jlrdw left a reply on Uploading Images To The `public` Directory Stops Working After The First Image Is Uploaded • 3 days ago

Here is some older code I have used

if (isset($_POST['submit'])) {
            $lid = DB::table('dogs')->count();
            $lid = $lid + 1;
            $file = Input::file('ufile');
            $file_name = $file->getClientOriginalName();
            $file_ext = $file->getClientOriginalExtension();

            $fileInfo = pathinfo($file_name);
            $filename = $fileInfo['filename'];

            $newname = $filename . $lid . "." . $file_ext;
            $destinationPath = ROOTDIR . 'upload/imgdogs/';
            $file->move($destinationPath, $newname);

            $dogpic = Cln::fixValue($newname);
            $dogname = ucfirst(Cln::fixValue($_POST['dogname']));
            $sex = ucfirst($_POST['sex']);
            $comments = Cln::fixValue($_POST['comments']);
            $adopted = (isset($_POST['adopted']) == '1' ? '1' : '0');
            $lastedit = date("Y-m-d H:i:s");
            
            if (!isset($error)) {
                $postdata = array(
                    'dogpic' => $dogpic,
                    'dogname' => $dogname,
                    'sex' => $sex,
                    'comments' => $comments,
                    'adopted' => $adopted,
                    'lastedit' => $lastedit
                );

                DB::table('dogs')->insert($postdata);
            }
        }

jlrdw left a reply on Uploading Images To The `public` Directory Stops Working After The First Image Is Uploaded • 3 days ago

Move should work, are you sure it is a different file?

jlrdw left a reply on Complex Relationship That Takes (too) Long • 3 days ago

whether they currently hold this particular membership

What particular membership

And what wrong with a checkbox(s) to check what type membership they hold.

jlrdw left a reply on The Best Hosting For Laravel 5,4 • 3 days ago

Would you believe this has been asked and answered? https://laracasts.com/discuss/channels/laravel/best-web-hosting

https://laracasts.com/discuss/channels/general-discussion/best-web-hosting-1

But any that meets requirements, and your memory requirements.

jlrdw left a reply on Redirect User After Log In To Different Pages According To Its Type LARAVEL 5.4 • 3 days ago

At very least add a default:

jlrdw left a reply on Store User Progress/actions In Database • 3 days ago

How are you managing "recording" where they are currently at? WIthout that it's hard to see what's going on. But storing would be no different than any other data, like phone, article, date, etc. Except you are (I guess) storing progress that will change.

Could have a start (whatever) in a session, when user is finished add that to session get total and store new result in the database table.

Just guess here, not enough info.

jlrdw left a reply on Laravel 5.4 (Eloquent) - How To Do Sortable With Storing Order In Pivot Table? • 3 days ago

You need an ->orderBy, I am guessing for plans is what you want ordered.

jlrdw left a reply on Database Fields: Nullable Or Not? • 3 days ago

@TaylorOtwell only 10,640 experience points, I am shocked, I figured you would start with like a billion or something.

jlrdw left a reply on Database Fields: Nullable Or Not? • 3 days ago

You can still sotre null if needed. SOmestimes it's good to have a null, other times a 0 (zero) here is a query fragment

$sql = $sql . " (SELECT (Sum(IFNULL(deposit, 0)) - Sum(IFNULL(widthdraw, 0))) FROM checks";

Yhere are times when a query doesn't give expected results if a null is there, so in the above, if nothing is entered I store a 0.00.

However is a date field sometimes if a date is blank I like a null, as I don't like

0000-00-00 

being stored. Really, some common sense.

Edit Your Profile
Update

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