jlrdw

Experience

204,020

228 Best Reply Awards

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

18th February, 2018

jlrdw left a reply on Globally Available Settings • 7 hours ago

Wouldn't hurt to have a class with static methods for global use, of course a use statement is required. As example I use this to figure out a checkbox:

    public static function fixCheck($rchk) {
        $rchk = ($rchk == 'on' || $rchk == '1' || strlen($rchk) > 0 ? '1' : '0');
        return $rchk;
    }

This way a 0 is entered in database if unchecked otherwise a 1 is entered.

Just a quick example. And I have found static methods are pretty darn fast when something is needed on the fly.

10th February, 2018

jlrdw left a reply on L5.5 Model Can't Be Founded In Distant Server But Works On Local Server. • 1 week ago

$option = new Option();

Is probably causing problems, refactor your code.

jlrdw left a reply on Error Installing Laravel/installer With Composer • 1 week ago

Have you

  • Cleared composer cache
  • Updated composer

jlrdw left a reply on Confusion In Directory System (public Vs Storage) • 1 week ago

Have you read over this https://laravel.com/docs/5.5/filesystem and https://laravel.com/docs/5.5/helpers

Take this line

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

It is simply a shortcut, to see where the shortcut points do something like

<?php echo asset('assets/upload/imgdogs'); ?>

Just examples.

jlrdw left a reply on L5.5 Model Can't Be Founded In Distant Server But Works On Local Server. • 1 week ago

Remember linux is case sensitive.

9th February, 2018

jlrdw left a reply on HOw To Post Ajax To Controller • 1 week ago

Please search this forum, has been taught so many times.

jlrdw left a reply on Page Works On Xampp But It Does Not Work On The Server • 1 week ago

Seriously for the 999th time set up laravel correctly, even in development. Follow this guide:

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

Main laravel goes ABOVE public_html.

See also https://imgur.com/Oo6k4Fp

8th February, 2018

jlrdw left a reply on Ongoing Issues With Sessions Being Re-created • 1 week ago

If you create a new token per request in ajax there is no issue.

jlrdw left a reply on Ongoing Issues With Sessions Being Re-created • 1 week ago

What bug, I have not had trouble with sessions in laravel. I'm not on desktop now I'm on a tablet later I will give you a link to a good post that shows properly posting with Ajax.

7th February, 2018

jlrdw left a reply on Eloquent And Doctrine Combined • 1 week ago

You have to use Doctrine database connection examples from their site not laravel site.

jlrdw left a reply on How To Use LengthAwarePaginator With Checkboxes By Retaining Its Value? • 1 week ago

Something like

<?php echo ($cat->adopted == 1 ? ' checked' : ''); ?>

Convert to blade if needed

jlrdw left a reply on Inner Join Nested In Outer Join Using Query Builder • 1 week ago

For a query than is a little complex I just use getPdo() and write regular sql.

jlrdw left a reply on Eloquent And Doctrine Combined • 1 week ago

See the docs, you can have more than one connection.

6th February, 2018

jlrdw left a reply on Browser Doesn't Load New Page When Redirected • 1 week ago

Do you have a proper route setup for that page and are you passing proper parameters?

5th February, 2018

2nd February, 2018

jlrdw left a reply on Make Relation With Condition • 2 weeks ago

Also look at query scopes. Review the documentation on it.

jlrdw left a reply on Loop Though Form To Pick Out Data • 2 weeks ago

@Cronix where is $index coming from?

jlrdw left a reply on Taylor Otwell Cancelled My Account Without Asking Me • 2 weeks ago

@georgek sounds like you need more server experience, but for now you can FTP a project. For proper setup see http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/

Laravel has to be setup correctly, otherwise you run into problems. so that is one rule to follow:

  • Follow the guide

jlrdw left a reply on Move Outside Php • 2 weeks ago

If OP needs large enterprise level, then OP would already know how to write custom c++ classes or java technology. OP would understand that php is better suited for small to medium applications, NOT a FEDEX size application.

1st February, 2018

jlrdw left a reply on How Does Jeffrey Make Screencasts Without Keyboard Sounds? • 2 weeks ago

Nah he has very delicate fingers.

jlrdw left a reply on MySQL For Development, SQL Server For Production • 2 weeks ago

To add for a serious SQL Server application I would look into using asp.net with the razor language.

jlrdw left a reply on Move Outside Php • 2 weeks ago

WHAT!

27th January, 2018

jlrdw left a reply on How Does Jeffrey Make Screencasts Without Keyboard Sounds? • 3 weeks ago

Auto keyboard

24th January, 2018

jlrdw left a reply on How Can I Execute This Query With Eloquent? • 3 weeks ago

if it's working as is just use it as is.

jlrdw left a reply on Handling 10s Of Thousands Of Rows • 3 weeks ago

When I had to do monthly reports I would dump the data to local and use Microsoft Access to handle the reporting. Prior to access I would use visual Foxpro. This stuff is so much more efficient in a local database.

20th January, 2018

jlrdw left a reply on When Creating Relations With The Laravel ORM, What Is The Raw MySQL Query Behind It? • 4 weeks ago

Jeffrey has a video that explains this, but basically to SQL queries.

17th January, 2018

jlrdw left a reply on URL's For Controller Actions - Where To Put It? • 1 month ago

For seo, you generally have to use parameters.

jlrdw left a reply on What Is Passed When Submitting A Form • 1 month ago

Or a common sense answer, the fields on the form. With the exception of a checkbox if not checked then nothing is passed for a checkbox.

16th January, 2018

jlrdw left a reply on What Is With() For? • 1 month ago

@p0t4t0 I understand, you probably need to view a video on the n+1 problem.

jlrdw left a reply on What Is With() For? • 1 month ago

This is in the documentation so I don't follow asking it here, sorry. Taylor actually gives excellent examples.

jlrdw left a reply on Need Clarification On Query Strings With Laravel • 1 month ago

Parameters or query string either way works.

jlrdw left a reply on Is There A Way To Extend The Query Builder? • 1 month ago

Write a normal query using getPdo ()

14th January, 2018

jlrdw left a reply on How To Use Non-Laravel Package • 1 month ago

Did you dump autoload?

13th January, 2018

jlrdw left a reply on Sessions Are Not Saving : Bug In Laravel Core • 1 month ago

And it works if a form is submitted, right?

jlrdw left a reply on Sessions Are Not Saving : Bug In Laravel Core • 1 month ago

Where is $currency coming from?

I set a search like

Session::put('dogsearch', $dogsearch);

And I use it after an edit to return to page I left off on (part of query string). 100% works.

You are some how passing a variable at the wrong time, thus the session isn't properly updating.

jlrdw left a reply on Laravel Passport • 1 month ago

I don't understand? Vue or not Vue you still pass the data to the server.

jlrdw left a reply on Sessions Are Not Saving : Bug In Laravel Core • 1 month ago

If you refresh page ???????? Is anything passed to $currency? A modern web app shouldn't be refreshing a page. Rather on each request go through proper view and route to properly pass the necessary data along.

If you are using ajax, DO NOT use session with ajax.

10th January, 2018

jlrdw left a reply on A User Has Polymorphic Type Relationship Help • 1 month ago

question_able

jlrdw left a reply on Multi Databases • 1 month ago

Use a variable.

9th January, 2018

jlrdw left a reply on Eager Loading Too Many Relationships - Is That A Good Approach? • 1 month ago

Or have a link by the replies to click to bring up perhaps a modal dialog to show more detail such as the likes. Usually a well built system doesn't over load the user. Rather have a way to see more detail if desired.

8th January, 2018

jlrdw left a reply on Validation On Checkbox Not Working • 1 month ago

As T said if a checkbox is checked it is yes, on, 1, or true. I never heard of having to validate a checkbox. If not checked nothing is passed. Therefore an "isset" would work. But oh well.

7th January, 2018

jlrdw left a reply on How To Check If User Is Logging In With Other Ip Address Laravel 5.5 • 1 month ago

Look up request in the API docs.

4th January, 2018

jlrdw left a reply on JQuery Save HTML Table To Database. • 1 month ago

I do something like https://drive.google.com/file/d/0B1_PFw--3o74RDFscjluVlBpNWc/view

You have to get the get the form inputs something like:

$("#podetail td:nth-child(1)").click(function (event)
        {
                event.preventDefault();
        var $td = $(this).closest('tr').children('td');
                var tid = $td.eq(0).text();
                var tdate = $td.eq(1).text();
                var tdescribe = $td.eq(2).text();

// process as you see fit.
        

3rd January, 2018

jlrdw left a reply on Having Confusion In Relationship • 1 month ago

Go to a grocery store an buy a few items, your receipt is a one to many. That receipt has may items. Those items you bought belongs to that receipt. Really pretty clear cut stuff.

jlrdw left a reply on Remove Public Folder In Laravel 5.5 • 1 month ago

@Snapey here we go again.

Folder structure should be like https://imgur.com/Oo6k4Fp

and properly installed even in development http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet

Or do as described if you don't worry about security.

Edit Your Profile
Update

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