jlrdw

Experience

191,800

215 Best Reply Awards

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

22nd September, 2017

jlrdw left a reply on Relation Between 3 Tables • 11 hours ago

Another older but good tutorial is https://scotch.io/tutorials/a-guide-to-using-eloquent-orm-in-laravel Gives good basic understanding.

jlrdw left a reply on Link To Edit Specific Database Item • 11 hours ago

I just do it like

<td><a href="<?php echo DIR . 'dog/edit?dogid=' . $row->dogid; ?>">Edit</a></td>

I don't always use blade however. DIR is a constant I defined.

21st September, 2017

jlrdw left a reply on Laravel ACL • 1 day ago

Have you worked any examples from the docs, or viewed any of Jeffrey's videos?

jlrdw left a reply on Eloquent Connections Staying Open And Having “Too Many Connections” On Aurora • 1 day ago

From PHP manual on closing a connection

If you don't do this explicitly, PHP will automatically close the connection when your script ends.

Now eloquent has nothing to do with anything, at runtime eloquent has to be converted to normal queries. In fact try something, test a normal query it will naturally run and finish faster. You are running inside a framework where some things are going through more processing.

It may be your queries needs a look over. But when the whole process is over, the connection is done. Taylor does not have persistent connections.

This is one of the pitfalls of active record, I'd say run some real test using straight PDO. Not fake test, but real live test. Laravel also has getPdo() for direct PDO usage.

jlrdw left a reply on Cannot Declare Class Because The Name Is Already In Use Error After Uploading To Server • 1 day ago

SHow some code, usage, is Departments a subfolder, what is the controller name, etc.

jlrdw left a reply on Edit Item • 1 day ago

Just curious, have you went through Jeffrey's free intro videos?

jlrdw left a reply on I Wanted Maintain The Error Log Is There Any Libraries In Laravel • 1 day ago

Once you have all working correctly, you shouldn't be getting errors. My error log is always empty, except during development of course.

jlrdw left a reply on Logout Issue After Uploading To Live Server • 1 day ago

You need to properly place the folder structure, see:

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

jlrdw left a reply on Cannot Declare Class Because The Name Is Already In Use Error After Uploading To Server • 1 day ago

What class, and exact error, stack trace.

jlrdw left a reply on How To Store Jpg File Into Sql Server? • 1 day ago

however,it is mandatory for this project.

Then I'd do another project and tell whoever blank blank. Just me. It is crazy storing images like that.

jlrdw left a reply on Can't Access Variable From Controller In The Blade View • 1 day ago

@sushma0596 could you mark as answered please?

jlrdw left a reply on Eloquent Connections Staying Open And Having “Too Many Connections” On Aurora • 1 day ago

Eloquent connections staying open

They don't stay open, you are probably getting too many hits. Check with your host / provider on load balancing.

20th September, 2017

jlrdw left a reply on Which Version Of Php To Install With Windows - Threadsafe Or Non Threadsafe, And Which Version? • 2 days ago

Have you even considered homestead? Just to check everything out.

But I'd imagine has a million hits on installing php, I thing Jeffrey even has a video on it. Not to mention Youtube.

jlrdw left a reply on Which Version Of Php To Install With Windows - Threadsafe Or Non Threadsafe, And Which Version? • 2 days ago

For dev you could install a bitnami stack, would be independent of your other mysql install.

19th September, 2017

jlrdw left a reply on Getting Started • 3 days ago

I'd start viewing some videos on the subject, besides Jeffrey, there are complete how to videos on youtube on deployment.

But really a simple pull from master, then an update / sync to the development folder and finally a composer update a couple times a week should do it. And really as far as git vs ftp, same files. The trick is to know what files need updated as there is no point in uploading everything every time.

jlrdw left a reply on Uploading Large Dimension Files • 3 days ago

Sorry, but very first question:

Is there a setting to limit the px dimensions of an uploaded file?

Now I see problem.

Need to make image web ready I myself use Adobe photoshop. High resolution (large) images and mobile friendly don't match, a big no no.

I'd restrict uploading anything until either

  • User makes image web ready

or

  • You find a decent library that does it for them.

I know Facebook optimizes webifies images

There answered.

jlrdw left a reply on Tools For Working With Laravel In Visual Studio Code • 3 days ago

If you are going to use Visual Studio Code, why not do one even better and just go with netbeans?

jlrdw left a reply on Uploading Large Dimension Files • 3 days ago

Just curious, did OP never read this in the docs:

dimensions

The file under validation must be an image meeting the dimension constraints as specified by the rule's parameters:

'avatar' => 'dimensions:min_width=100,min_height=200'

Available constraints are: min_width, max_width, min_height, max_height, width, height, ratio.

A ratio constraint should be represented as width divided by height. This can be specified either by a statement like 3/2 or a float like 1.5:

'avatar' => 'dimensions:ratio=3/2'

Since this rule requires several arguments, you may use the Rule::dimensions method to fluently construct the rule:

use Illuminate\Validation\Rule;

Validator::make($data, [ 'avatar' => [ 'required', Rule::dimensions()->maxWidth(1000)->maxHeight(500)->ratio(3 / 2), ], ]);

jlrdw left a reply on Guards. I Don't Quite Get Them. • 3 days ago

Other good sources of info on security:

https://www.owasp.org/index.php/Main_Page

http://shiflett.org/articles

I generally writ my own auth / roles and csrf routines, just don't like laravels built-in.

jlrdw left a reply on Recommend Me A Code Along Project! • 3 days ago

I'd also make sure you have practice forms with a checkbox, date field, option group (select), etc. Take a checkbox for example, many newbees don't realize that if a checkbox isn't checked nothing is passed, so you have to handle how to deal with that.

Also a popup calendar and perhaps a popup lookup table.

Start off slow, remember one step at a time.

Just my suggestions.

jlrdw left a reply on Ldap Authentication • 3 days ago

See answer here https://laracasts.com/discuss/channels/laravel/recommendations-for-upgrade-from-50

Check if Laravel Shift can help you.

jlrdw left a reply on Uploading Large Dimension Files • 3 days ago

They say that there's no setting to limit this.

Use a library that has the requirements you need.

jlrdw left a reply on Traversing Multiple Many-to-many Relations • 3 days ago

Wouldn't it be easier to have

  • User and their clients on one host one system separate from other users
  • Each customer their own domain, site, setup

jlrdw left a reply on Laravel Installer Vs Composer Create-package • 3 days ago

Just pull master, change your dev to match then run composer update, I do this every few days.

jlrdw left a reply on How To Return Array From DB::get()? • 3 days ago

Normally someone doesn't query that many records at once, that's why there's pagination.

jlrdw left a reply on How To Return Array From DB::get()? • 3 days ago

$dogid = '1';
        $sql = "SELECT * FROM " . PREFIX . "dogs WHERE dogid = :dogid";
        $sth = DB::getPdo()->prepare($sql);
        $params = [':dogid' => $dogid];
        $sth->execute($params);
        $dog = $sth->fetch(\PDO::FETCH_ASSOC);
        print_r($dog);

Just a quick test.

jlrdw left a reply on Is There Any Way To Check Internet Connection On Web. • 3 days ago

@sam0081 so you have intranet?

jlrdw left a reply on Is There Any Way To Check Internet Connection On Web. • 3 days ago

  • If you are online you have internet
  • If your internet is down you are offline

18th September, 2017

jlrdw left a reply on Is It Possible To Use Laravel As Wrapper For Quasar-framework.js? • 4 days ago

Other way around

quasarjs in laravel

Seems quasarjs is a js frontend, correct? So if it works with php it works with laravel.

jlrdw left a reply on Interface 'Throwable' Not Found • 4 days ago

Did you remember to put the use statement

use Illuminate\Support\Facades\DB;

This

$dog = DB::table('dc_dogs')->where('dogid', '=', $dogid)->first();

as example is working for me.

16th September, 2017

jlrdw left a reply on Question Time. Feel Free To Answer! • 6 days ago

    1. What packages do you pull in when starting a new project?

none

    1. Do you use a CSS framework? If so, please list

I write my own css and media queries

    1. Do you separate your project into composer packages / modules or keep it all within the app directory?

I look at at laravel as crud and database management

    1. Do you use a JS framework? If so, please list

Some jquery, I dont believe in over-javafication So a popup calendar, popup lookup, inline edit only in certain situations, etc.

    1. na
    1. I use the folder structure like docs
    1. Only comment where something is complex, the obvious no.
    1. I apply proper namespacing

Example I have a helper folder where I have a custom paginator for popup lookup tables, the namespace is

namespace App\Helpers;

jlrdw left a reply on Atom IDE-PHP Doesn't Work • 6 days ago

Netbeans is pretty good also.

15th September, 2017

jlrdw left a reply on Is 2 Weeks For Learning Laravel Fast? • 1 week ago

Same here I came from java and c# prior to php, php was fairly easy to grasp. To really learn laravel, learn what to "weed" out vs what's really needed.

If you have programmed in java, you should know that large enterprise doesn't jump on latest thing, or update stuff every other month.

jlrdw left a reply on Suggested Laracasts Videos For Learning How Laravel Works Under The Hood? • 1 week ago

That engine running internally is PDO and PHP, that's it.

14th September, 2017

jlrdw left a reply on Recommendations For HTML & CSS Free/paid "Laracasts-like" Video Tutorials. • 1 week ago

You could start here would probably be better than a video anyway https://www.w3schools.com/html/

They also cover CSS.

13th September, 2017

jlrdw left a reply on Laravel Keep Eating Memory With Every Request • 1 week ago

@Cronix good to know, where do you put

DB::disableQueryLog();

jlrdw left a reply on Laravel Keep Eating Memory With Every Request • 1 week ago

Are you running a query that returns a huge resultset rather that paginating? Also just load what's needed on a page. As an example if an edit page only uses some js for a popup calendar just load that js, not 10 million lines of other js.

jlrdw left a reply on How Can I Check If The App Is Using The ConvertEmptyStringsToNull Middleware? • 1 week ago

If you haven't commented it out it is.

12th September, 2017

jlrdw left a reply on Bug In Reset Password • 1 week ago

@Tupakamaru if you have verified that, @TaylorOtwell states

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at [email protected] All security vulnerabilities will be promptly addressed.

I'd put in subject line Security Vulnerability

jlrdw left a reply on Laravel Vs Plan PHP With No Framework • 1 week ago

Yes, watch the intro videos.

11th September, 2017

jlrdw left a reply on CSS And JS File Not Found After Deploy • 1 week ago

Look at this folder structure

https://drive.google.com/file/d/0B1_PFw--3o74WHNmMFlkRklKRTg/view?usp=sharing

Even on xamp or whatever install laravel using this guide:

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

Again in development and production use the guide, I recently used it for a shared host, the guide works 100% with zero problems.

Load your css using asset helper:

<link href="<?php echo asset('assets/css/dog/style.css'); ?>" rel="stylesheet">

Just correctly resolve your paths.

jlrdw left a reply on OrderBy Or SortBy Of GroupBy Sum • 1 week ago

jlrdw left a reply on Combining Sortby / Pagination : Best Practices? • 1 week ago

Watch this https://drive.google.com/file/d/0B1_PFw--3o74YjVreHNBOWU2aEE/view?usp=sharing

An example is using `like'

        $dogsearch = (isset($_REQUEST['psch']) <> '' ? Cln::fixValue($_REQUEST['psch']) : "");
        $dogsch = $dogsearch . "%";
        $aval = (isset($_REQUEST['aval']) <> '' ? Cln::fixValue($_REQUEST['aval']) : "");

change to laravel request if desired

and

$query = Dog::where('dogname', 'like', $dogsch);
        if ($aval == "n") {
            $query->where('adopted', '=', 1);
        } else if ($aval == "y") {
            $query->where('adopted', '=', 0);
        }
        $dogs = $query->orderBy('lastedit', 'DESC')->paginate(5);
        $pagelinks = array('psch' => $dogsearch, 'aval' => $aval);

and view

echo '<td>' . $dogs->appends($pagelinks)->links() . '</td>';

Of course all passed to view with ->with statements.

And the little form at top of list page to perform a search:

<div>
    <form method="post" action="dog/indexadmin">
    <!--<form method="post" action="<?php //echo DIR; ?>dog/indexadmin">-->
        <label>sch</label><input type="text" name="psch" value="">
        <label>Avail y or n</label><input type="text" name="aval" value="" size="10">
        <input type="submit" name="submit" value="Search">       
    </form>
</div>

jlrdw left a reply on How Can We Take Benefit To Learn Laravel & VueJs? • 1 week ago

Like asking

  • How do I become an electrician

Go through the apprenticeship program and on the job training.

  • How to become a doctor

Take all college requirements and fulfill the residency requirements.

  • Your question

Learn php, html, css, js, etc, then start learning laravel through docs, videos, etc. Many of these folks have programmed for years. This stuff takes a while to learn correctly.

jlrdw left a reply on How To Return The Image From The Storage Folder? • 1 week ago

I don't know about all of that, I just made an asset folder and

<img src="<?php echo asset('assets/upload/imgdogs') . '/' . $row->dogpic; ?>

zero problems.

jlrdw left a reply on How To Make Your Laravel Project Faster • 1 week ago

phalcon framework is the fastest one

Because it's compiled C or C language extension, ofcourse it's faster.

How to make your laravel project faster

Real question is php. Load balancing a large site helps.

But laravel is fine as is for a medium to small site. I came from enterprise java to php, (long story). I have a site I did in ver5.1 and maintain for a humane society.

Now is laravel / php ready Fedex size well no.

So unless you are programming something like

  • Fedex
  • CH Robinson
  • JB Hunt
  • Walmart Sams warehousing / logistics

uses, the you are just fine with php / laravel.

Large enterprise use java / servlets / EJB or if using php, the have compiled c++ classes for heavy hitting. Usually they will have custom code / framework for their needs.

As an example, CH Robinson has around 23 million dollars in their logistics solutions.

jlrdw left a reply on Getting Started • 1 week ago

And to add to what @sutherland said there are free videos to get you started.

A quote from docs

"Are you a visual learner? Laracasts provides a free, thorough introduction to Laravel for newcomers to the framework. It's a great place to start your journey".

Edit Your Profile
Update

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