jlrdw

jlrdw

Member Since 4 Years Ago

Experience Points 342,930
Experience Level 50

0 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 102
Lessons
Completed
Best Reply Awards 355
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

15 Jul
1 day ago

jlrdw left a reply on Can Laravel Handle More Than 10K User At Same Time ?

Answered, but take a little field trip.

  • Visit a place running a blog only
  • Visit a place like Fedex server storage

There, answered. Fedex will have large banks of servers.

One for blog single server, no need to load balance.

You need a consultant to help with the setup for a large POS system.

When I did java programming at a trucking and logistics company, I did not set up the server, we had that done.

Tomcat and or TomEE is not easy anyway, at least not for me.

jlrdw left a reply on GroupBy And Chunk - How Do I Go About It?

I normally use group by like: see this

https://laracasts.com/discuss/channels/laravel/groupby-table-values-in-eloquent

And it's okay to turn strict off.

jlrdw left a reply on Can Laravel Handle More Than 10K User At Same Time ?

Laravel has not much to do with it, it will be a correct server setup with proper load balancing, etc.

Php and Mysql can handle it, therefore laravel and Mysql can.

Also efficient indexing.

jlrdw left a reply on GroupBy And Chunk - How Do I Go About It?

Group by transverses the whole recordset anyway. If there is a way to avoid it do it.

I would usually reserve group by for things like monthly reports.

But you could use the length aware paginator with group by.

https://laracasts.com/discuss/channels/guides/length-aware-paginator

You could also "query a query" and have several smaller group by's. Point is there are many ways to do this.

The most efficient is, if a big dataset is of course dumping to local, and via odbc using a desktop database to generate reports and such.

I in the past have used Visual Foxpro and later MS Access.

jlrdw left a reply on "Nested Pagination": Paginate (sub-)item In ApiResource

When I said custom, I still meant laravel, there's:

https://laracasts.com/discuss/channels/laravel/trouble-with-pagination-with-collection

And Length aware paginator:

https://laracasts.com/discuss/channels/guides/length-aware-paginator

Which from the API you can highly customize:

https://laravel.com/api/5.8/

But realistically a paginator is so easy to write anyway, wrote my own in Java for many years.

11 Jul
5 days ago

jlrdw left a reply on Find And Replace In Laravel Collection

Excellent !!!! Changing "DB::table('accounts')" to "Account::..." worked. Thanks for pointing out.

And you did not show as answered, therefore other stumble over this thread. Could you please show as answered.

jlrdw left a reply on "Nested Pagination": Paginate (sub-)item In ApiResource

Have two divs, one paginate next parent, other paginate children.

https://i.imgur.com/6nGcvF7.jpg

Was just done as a quick demo a while back, thus no formatting.

Such as this is used for accounts receivable, i.e., next company, and can paginate through the companies receivables.

jlrdw left a reply on Lite CMS Package

In a similar framework, this author demos writing a cms, have a look. https://daveismyname.blog/building-a-content-management-system-from-scratch

jlrdw left a reply on Sql Query Too Slow

Try not to use active record on search with that many records, rather use getPdo().

Index any column you expect to search.

Do not use star if you don't need all fields, use only the fields needed.:

SELECt * from ...   ///   Don't do this

// instead

SELECt `id`, `mydate', (and only fields needed) from ...

In a search text box use more characters, example you are finding someone with the last name of White.

Don't enter just a w.

Enter at least or 4 characters like whit.

If a search can be done via a numeric index, use it instead when possible.

I.e., You need to pull up Joe White in the database. However if he has a customer number, use it.

Numeric is always more efficient.

GetPdo() example: https://laracasts.com/discuss/channels/guides/getpdo-usage

Bind you parameters.

And:

https://laracasts.com/discuss/channels/guides/length-aware-paginator

Also there are special pagination techniques for databases with millions of records, basically you use greater than a certain index and less than. LIMIT in mysql get less efficient as a database grows.

Step one should be gettingaway from active record (eloquent) and use pdo direct (getPdo()) the pdo instance in laravel.

In fact I used to export data monthly, had an odbc setup on local and did monthly reports in MS Access, much more efficient.

10 Jul
6 days ago

jlrdw left a reply on Lite CMS Package

There are some already built with laravel, you could probably do a Github search and look over some.

jlrdw left a reply on Detect PDF Version With PHP

@aurawindsurfing dang, I didn't realize my glasses had got so dirty.

What are you needing, like which and if someone has adobe pdf installed? Adobe has articles on this.

When you say pdf, what and who.

jlrdw left a reply on Detect PDF Version With PHP

Ah go to symfony http foundation docs, but you need to find the api, then github code.

They have code in there that figures th php version. Sorry don't have link right off hand, will try to find again.

jlrdw left a reply on Ajax GET Request Not Finding Proper Route

Did, updated answer:

OP, for the sake of simplicity got o google an cut and paste this:

site:laracasts.com laravel jquery get request
or
site:laracasts.com laravel jquery get response  //whatever

And read. This stuff has been covered hundreds of times with great examples.

jlrdw left a reply on Ajax GET Request Not Finding Proper Route

He has post in ajax:

type: "POST",

jlrdw left a reply on Detect PDF Version With PHP

Just run a php file with:

phpinfo();   // nothing else in it.

jlrdw left a reply on Ajax GET Request Not Finding Proper Route

Have you played around with the placement of the slashes.

url: 'petupdate',

Notice no leading slash.

This stuff takes a little trial and error sometimes.

By the way my Ajax post works perfect.

Make sure your token is included as mentioned above.

jlrdw left a reply on Ajax GET Request Not Finding Proper Route

There has been hundreds of good Ajax examples here just curious why not look up some of them and get ideas.

09 Jul
1 week ago

jlrdw left a reply on Middleware Vs Guards Vs Gates/Policies

Guards, gates, policies is RBAC.

jlrdw left a reply on Laracasts Refund

Very professionally done.

jlrdw left a reply on What's The Difference Between Model And Entity?

Laravel doesn't have entities (active record). Hibernate and Doctrine ORM does.

Model is a very loose term, PDO is just retrieving a "database" record or records. Some here for whatever reason has attached the term "model" to a stored database record.

jlrdw left a reply on How To Show An Output Value In Browser

Just a suggestion, why not take a jquery or javascript tutorial on the basics first.

I usually

$('#dogname').val(data.dogname);  // json response
//or
$('#your_controll').val("Hello");

But please consider a tutorial first.

08 Jul
1 week ago

jlrdw left a reply on Simple And Best Steps To Create A Authentication Model

Remember a user either can or cannot do something, PERIOD,

Some links might help:

https://laracasts.com/discuss/channels/general-discussion/authorization-policies-and-reducing-the-repitition

https://laracasts.com/discuss/channels/laravel/security-in-controller

https://laracasts.com/discuss/channels/laravel/multi-auth-on-laravel-using-the-same-login-page

https://laracasts.com/discuss/channels/laravel/guys-need-a-big-suggestion-for-login-permission-for-different-users-laravel

https://laracasts.com/discuss/channels/laravel/using-laravel-policy-to-filter-eloquent-query

https://laracasts.com/discuss/channels/code-review/multi-auth-with-different-login-forms

https://laracasts.com/discuss/channels/laravel/i-want-to-create-two-types-user-panel-for-two-types-user

https://laracasts.com/discuss/channels/laravel/users-userdetails-tables

https://laracasts.com/discuss/channels/site-improvements/is-it-best-practice-to-store-role-type-in-the-session

https://laracasts.com/discuss/channels/laravel/policy-logic

https://laracasts.com/discuss/channels/laravel/security-in-controller

And a good package:

https://github.com/spatie/laravel-permission

But if you learn RBAC, not needed.

In fact an example from spatie examples:

quote

public function update(User $user, Post $post)
    {
        if ($user->can('edit own posts')) {
            return $user->id === $post->user_id;
        }
        if ($user->can('edit all posts')) {
            return true;
        }
    }

unquote

I do not like the term "Super Admin"

As example I had a case where I had admin role and bookkeeper role.

The admin could "view" the data, but not fiddle with the bookkeeping.

Forget about names, think:

What can this logged in user do or not do, period.

I do not believe in a super admin role, even the owner of the company may not be qualified for certain things. Yes view data, but not "muck" it up.

07 Jul
1 week ago

jlrdw left a reply on GetAuthPassword() Is Not Working.

Before you do anything else watch Jefferies free video series where he covers basic Authentication and authorization.

These videos are referenced literally on page one of the documentation so really there should be no point in repeating the link here.

jlrdw left a reply on Reagent Code

Please for a customer to have a good safe working site, please explain you need to take several months and learn programming better.

Just nicely inform the customer move on to another programmer for now.

Then take a class somewhere so you can fully understand the basics some of this programming.

Seems that all you are doing is copy and paste some answers but actually not learning what to do on your own.

Hopefully this is just some friendly advice.

You've been at this quite some time here but still asking the same sort of questions, by now you should be able to whip out a basic crud application.

jlrdw left a reply on How To Show Multiple Table In A Blade?

Please don't actually use this stuff on a real customer site.

Please.

06 Jul
1 week ago

jlrdw left a reply on C# Make An Class "employee" With The Atributes "name" And "salary"

Go to the asp.net forum. It's a real good forum. Can sign in with Facebook.

jlrdw left a reply on How To Show Multiple Table In A Blade?

Send both to view and loop through like you would if it was just one.

jlrdw left a reply on What Is Data Type To Store Date In Laravel?

I have date like '02 jul 2019' in My data input.

Study and learn data types and how and what happens with them.

That's what "carbon", "php date format" etc is for, to perhaps display a certain way.

But no matter the display for user

It is stored in the database as YYYY-MM-DD

jlrdw left a reply on Simple And Best Steps To Create A Authentication Model

Simple and Best Steps to Create a Authentication Model

Sorry but the question is confusing. Jeffrey covers basic authentication and authorization in his free videos series.

It's referenced on page one of the docs, so should be no need to put an already given link here again.

04 Jul
1 week ago

jlrdw left a reply on Display Numeric Values As Text

Probably similar to:

https://laracasts.com/discuss/channels/laravel/how-to-get-sum-from-inside-the-foreach?page=1#reply=521278

Where it doesn't hurt to offer an OP an alternative.

But just a 1.5 cents.

jlrdw left a reply on Display Numeric Values As Text

Why don't you use radio's for these, much easier.

jlrdw left a reply on I Don't Understand Request Objects In Laravel

Why don't you study up on authentication and authorization and api access tokens.

You seem to be getting authorization confused with request.

jlrdw left a reply on How To Rollback Laravel/framework 5.8.27 /WAMP W10

Just restore the backup you made.

jlrdw left a reply on Laravel Query

Please properly format your code.

And there are literally thousands of query Builder and eloquent query examples.

03 Jul
1 week ago

jlrdw left a reply on How Html Developer Can Work With Live Site?

HTML5, CSS3 and responsive design.

I agree, if you ask them what a media query is, and they don't know, watch out.

jlrdw left a reply on RFID In Laravel

C H A P T E R 1 - Introduction to Sun Java System RFID Software

jlrdw left a reply on How Html Developer Can Work With Live Site?

Been at it since 1988. You should know the "basics" have not changed.

Unless they have removed the most powerful programming construct: the "if". Without that, there would be no programming.

And no I do not get "frame-work-matized". Because of a forum. I just try to help people when I can.

jlrdw left a reply on How Html Developer Can Work With Live Site?

It's just like building a house.

Lol, modern engineers, scientist, etc can't even figure how the ancients placed some 300 ton blocks together with a perfect fit.

We don't know the past that far back, it's all guess work.

But no matter, a basic if else endif is the same.

Looping over something is the same.

The basics have not changed a single bit. My first programming ever was dbase 3. If someone can learn to program an application in dbase 3, or c#, or php, they can adapt to any language.

I even programmed cnc machines at one time, I had to know and use analytic geometry a lot.

But the analytic geometry did not make me any better, it was those trusty if's, loops, etc.

jlrdw left a reply on How Html Developer Can Work With Live Site?

Bare Basics of programming hasn't changed. If statements, loops, and things of that nature.

Routine programming is no harder today than it ever was.

But true you have to learn the fundamentals.

And even if you're not an expert on servers you can hire that part done.

But again vue it's not an applicability for a modern database management system.

Html is.

jlrdw left a reply on How Html Developer Can Work With Live Site?

but web development is harder today

you have got to be kidding with all the Google searches and the other search engines readily available with tons of free tutorials.

Forums also.

In the eighties there was no internet, or Microsoft Windows.

You had to buy the book or hope the manual covered what you were doing good enough.

Heck most folks new to laravel are up and running professionally one week after installation with no prior programming skills.

With the Forum they can simply get copy and paste code.

I usually give an example but not copy and paste stuff for someone since they need to learn.

And HTML is the key front end no matter the other libraries.

Vue isn't even required for a complete web database management system.

But a back in programming language and the as you say easy HTML is.

jlrdw left a reply on I Don't Understand Request Objects In Laravel

You should really study the symfony Docs

https://symfony.com/doc/current/components/http_foundation.html

This stuff is readily available and Taylor refers to symfony in the laravel Docs.

All explained and covered and documented just curious why ask again here.

02 Jul
2 weeks ago

jlrdw left a reply on How Do I Keep Getting Hacked On PHPUnit?

Main thing set up correctly:

https://laracasts.com/discuss/channels/laravel/next-issue-fonts-and-images-arent-visible

If a D.O. type setup they have tutorials.

And this has been covered so many times here, the proper "setup", "folder structure".

jlrdw left a reply on How To Get Sum From Inside The Foreach

You do realize a small one liner query will do a sum.

You really need to study and practice aggregate functions.

You do not need an array, you do not need a collection.

Just learn how to write a query.

jlrdw left a reply on How To Populate A Dropdown Menu From Database ?

Ironically enough this question has been answered so many times. A simple search on Google for example.

site:laracasts.com populate dropdown
30 Jun
2 weeks ago

jlrdw left a reply on Policy Usage: Adding More Policies

See this and some of the links

https://laracasts.com/discuss/channels/laravel/multi-auth-login-with-single-table-user-using-middleware-in-laravel

I see so many people way overcomplicating RBAC.

If you could just remember a logged-in user depending on their role, neither can or cannot do something.

Me personally I like catching this flatly function or method level.

I use laravel Authentication in conjunction with custom helpers that verifies whether a role matches if the user can or cannot.

29 Jun
2 weeks ago

jlrdw left a reply on Maximum Execution Time Of 60 Seconds Exceeded

Do you have images also for the pdf. Just saying that could be the problem. Perhaps search S.O. it may have been answered in the past.