3 Best Reply Awards

  • Member Since 10 Months Ago
  • 60 Lessons Completed
  • 0 Favorites

18th June, 2018

SapporoGuy left a reply on Load Balancing Of Authentication And Session, Without Opening Firewall • 3 months ago

@cronix knows about this probably better than I do.

To add to his answer, the load balancer pings the servers to check for cpu usage basically, it redirects traffic to the less congested server. So, this means that if you do pull down a server like doing a VSTS release, the load balancer will send the traffic to the available server(s).

yeah, running a load balancer as the public facing machine is weird. I still haven't figured out yet.

As for the sticky persistence. I had needed it to prevent logouts. Play with the value. I wouldn't set it at first but you might notice weird session behavior.

I didn't really emphasis this enough, you should consider what you are doing with images and uploads. Running another machine or dedicate storage device is really handy. You don't have to worry about syncing and what not. You could also run a server to act as a caching device for media.

SapporoGuy left a reply on Load Balancing Of Authentication And Session, Without Opening Firewall • 3 months ago

If you have a load balancer then that is what is public facing. Behind the load balancer and firewall are your Laravel Servers, DB server, storage server and Redis server. So, if my network understanding is correct, you should be ok with Laravel talking to the DB server.

You might need to use sticky sessions on the load balancer. I think it's better to keep users on one specific Laravel server rather than having them jump between Laravel servers randomly.

15th May, 2018

SapporoGuy left a reply on Which Laptop To Buy? • 4 months ago

Buy a used a machine if possible and then go for a model with an i7 and lots of ram.

Screen is going to be a major consideration. I can't stand 13" screens since my eyesight is not good. Another thing to consider is the keyboard. I used Apple keyboards for decades and even after 6 months on a windows machine, I still can't stand that window's button.

As for the OS, some laptops can manage being used as a hackintosh. Or you could do virtual box with whatever OS.

You don't need the fastest and greatest for developing but you do need is a solid CPU and ram.

The last thing to consider is resale value. Anything not Apple just don't keep their value.

The OS should be what works for you. I like OSX and I get things done. Linux for me is ok but it does help with learning how to deal with servers. Windows is good if you need to learn IIS.

9th April, 2018

SapporoGuy left a reply on Why Laravel? • 5 months ago

I haven't searched for a new framework since I've found laravel which was in 2012-13.

I'd say your other choice is Symfony or maybe phalcon.

Why did choose Laravel? The community. Trying to get help with Symfony was just too difficult. Maybe, things have gotten better.

Why do I stay with Laravel? It keeps getting better and better. I also learn lots of new design patterns.

Also, I see Taylor every so often at Moes or out shopping. I live about 15 minutes away from the dude. He's a really shy guy!

SapporoGuy left a reply on Where To Go ? Laravel Or .NET Core 2 • 5 months ago

Difficult choice.

PHP has gotten much better and with laravel/symfony, more real world options in enterprise are starting to happen.

Support for php in an enterprise that has little experience will face trouble. It is doable but much of the IT support will just look at you and wonder what is going on.

Also, salary is a factor. Is your area mostly Enterprise or smaller shops which tend towards PHP?

Finding jobs with just laravel can be a problem too.

13th February, 2018

SapporoGuy left a reply on Data Migration From Non-laravel To Laravel App • 7 months ago


Until now I did the CSV read and insert routine. I am going to five this a try.

1st February, 2018

SapporoGuy left a reply on Data Migration From Non-laravel To Laravel App • 7 months ago


That sounds like how I do it.

You mentioned converting sql to mysql, is that as in letting an app do that for you? Or tying to edit the tables with a schema change script?

SapporoGuy started a new conversation Data Migration From Non-laravel To Laravel App • 7 months ago

Normally, the databases aren't on the same machine or could be sql to mysql.

Until now I have been dumping the data and then using scripts to convert the data to the new schema. Basically map the old columns to the new columns, make adjustments like switching "yes/true" to "0" and such.

I haven't tried porting a db schema from sql to mysql and then doing column name changes. Just straight CSV read and insert.

I was wondering how everybody else is doing data migrations?


29th January, 2018

SapporoGuy left a reply on Testing Sequence Order For Laravel Dusk • 7 months ago

I am using a test db to do this. I log in with users who I built and always check login.

For data I just pass "test category +" random_number().

Because I know my data I can then do $category_id = 155 when I need to debug.

I have seen a lot about faker and whatever, but I needed to make tests rather than study for 3 days. So, I did what works for me. It is not best practices but who cares? Maybe, my pride but I am getting the job done right now.

SapporoGuy left a reply on Using A Test Database With Dusk • 7 months ago

You haven't provided code so it's hard to help.

  1. looks like faker is missing or not being called properly. You need to track that down.

For me:

I called my dusk env file: .env.dusk.testing (I'm still new at this but it works). I also use a test db and don't call migrations and such because dusk takes a long time to run lots of tests. I just refresh my test db every so often. Plus I like seeing the data for when I work straight in the browser.

SapporoGuy left a reply on WebDriverCurlException (And Self Signed Certificate) • 7 months ago

I am still new to testing so I can't really give you answer.

But Chrome could be the problem. Chrome has tightened down web security and stopped allowing .dev domains on localhost with version 63 on OSX. So, I had to find v62 and blocked any updates to Chrome v62. I suspect your problem is related to how Chrome now handles security and self-signed certs. Windows 10 Chrome v63 and OSX v62 blocks self-signed certs and it's driving me up the wall.

I am able to run dusk tests on OSX v62 but this is on my local machine.

19th January, 2018

SapporoGuy left a reply on SWITCH TO LINUX • 8 months ago

OSX user here. I also use Linux. I also need to use windows for work now.

I don't like windows for an OS. Linux rates a little lower at times compared to windows for me.

I see a OS for personal use as a personality choice. You are either more productive or not.

I like OSX because I like having a built in server and the UI. I also am much more used to the keyboard and short cuts. I run a hackintosh at home with a mac keyboard.

I use windows at work and keep having productivity issues due to keyboard and needing to learn all kinds of new software. Some things I do like. One thing that really impresses me is Windows VSTS and some other corporate productivity apps. My machine is locked down so running the linux compatibility environment is not possible so I run vmware with OSX on it -- it solves my needs.

As others have suggested you could run homestead or build your own linux enviornment with virtualbox. Learning the server side stuff is no doubt a huge benefit.

But is wasting a huge amount of productivity to migrate really worth it?

Yeah, yeah linux this and that. But in reality, you will need to do a lot of eco-system switching. Take you time and use a virtualbox situation first and if you like it, wipe out your windows install and move it to a vm machine slice to keep some of the apps you really need.

17th January, 2018

SapporoGuy left a reply on Laravel CMS • 8 months ago

October seems very symfony so I never kept with it after their release.

Statmic if not mistaken is flat file so I didn't bother following up on it.

Pyro has streams or whatever they call them and found them confusing.

check out Coaster. It has a funky modx style of variables and it isn't a bad october/pyro style of system.

Asgard ... I go back and forth on this one. It has a lot going for it but I still think the dev is over complicating things.

SapporoGuy left a reply on Laravel 5.4 - Get Translations From Database Instead Of Lang Files • 8 months ago

I used a modified settings package back in L4.x. You should also consider caching the inital db call to make this faster too.

I used to be real big on this type of functionality until I realized that language files just don't change that often.

Are you planning to let people do their own translations?

SapporoGuy left a reply on How To Store Complex Dates In Mysql • 8 months ago

Just gonna throw out a dumb suggestion, but why not store them as unix epochs? Obviously lots of conversions will need to be done but storing the date-time will be unified.

posted: 1516218606

SapporoGuy left a reply on Dusk: How Can I Do A Search And Check For A Value Returned From Datatables (yajara) • 8 months ago

I am not sure what went on here but this is how I solved it.

                    ->type('input.form-control.input-sm', $default_category_name)

for some reason I needed to declare the class since dusk was not seeing the search type.

16th January, 2018

SapporoGuy started a new conversation Scout + Algolia But Not Elastic. Why Is That? • 8 months ago

I was wondering why Laravel documentation provides information for algolia but not elastic. Is this just because it's a lot easier to implement and pass along services to these companies or is this a minor revenue stream that is helping out laracasts and Taylor?

15th January, 2018

SapporoGuy started a new conversation VSTS For Deployment • 8 months ago

I was wondering if anybody has used VSTS for their build process and if anybody has seen a laravel specific article on it?

11th January, 2018

SapporoGuy started a new conversation Dusk: How Can I Do A Search And Check For A Value Returned From Datatables (yajara) • 8 months ago

Here is what I have tried so far

                    ->type('search', $default_category_name)
                    ->assertInputValue('search', '')

But would get a textarea error ... wth?

//                    ->clickLink('Last')

But would get an array error.

What I am trying to do is a search on a datatables data.

also, why doesn't dusk/phpunit know that a page is actually beyond the resolution (meaning it needs to scroll)?


8th January, 2018

SapporoGuy left a reply on Which Course To Choose? • 8 months ago

Why not watch vue1 without doing the code and then watch vue2 as you would normally study?

14th November, 2017

SapporoGuy left a reply on Help With Spatie/Permissions (and Maybe Redis) • 10 months ago

That's just weird.

try this package:

I am lazy so I just normally start with that boiler plate.

SapporoGuy left a reply on Authenticate A Device Rather Then A User • 10 months ago

Theoretically, it should be the same as doing this by login/password.

I haven't done this yet but I would possibly use the device ID and then pass the ID for login and hash the ID for the password. Then I would break it out properly into it's own guard once I knew it would work. I am guessing but you might have to disable the default guard to do what you want.

Sorry for all the guess work but I didn't want to see your post go empty. This happens to me a lot.

Just out of curiosity. How are you grabbing the device ID?

9th November, 2017

SapporoGuy left a reply on How To Insert A Csv File Database That Contains Thousands Of Lines In The Laravel Seeder Without Typing It Value After Value • 10 months ago

I normally do this with a seed command because I often get CSV files to update 100s of entries.

Here is a very basic way that I do this:

public function run()

// users
// clear out the current table to add new data and reset the increment count to 1

    $statement = "ALTER TABLE users AUTO_INCREMENT = 1;";

    $csv = dirname(__FILE__) . '/data/' . 'users.csv';
    $file_handle = fopen($csv, "r");

    echo PHP_EOL;
    echo '------------------------------------------ open file ------------------------------------------';
    echo PHP_EOL;

    while (!feof($file_handle)) {

        $line = fgetcsv($file_handle);
        if (empty($line)) {
            continue; // skip blank lines
        if ($line[0] == 'ID') {
            continue; // skip column headers

CSV column names
0 ... ID
1 ... NAME
2 ... NUMBER
3 ... NOTES

            $insert = array();
            $insert['name'] = $line[1];
            $insert['number'] = $line[2];
            $insert['notes'] = $line[3];

// insert

            echo 'insert: ' . $line[1] ;
            echo PHP_EOL;




    echo PHP_EOL;
    echo '------------------------------------------ close file ------------------------------------------';
    echo PHP_EOL;

} // run

Obviously you could update this to run checks on data or do what ever else you want to it.

I echo lines so that I can monitor the output in the terminal to catch any errors or logic problems in my code.

8th November, 2017

SapporoGuy left a reply on Controller Questions • 10 months ago

@ejdelmonico did a good job explaining this but I will try to make it more simple.

  1. Yes. "Article" here is the name of the model.

  2. No.

compact('articles') is the variable from this line

$articles = Article::latest()->paginate(5);

Bascially, "compact('articles') is just saying to pass the variable $articles to the template.


So you pass the variable $articles to the template located at resources/views/articles/index.

"view('articles.index'," uses dot notation which would be the '/articles/index" I just mentioned.

You were sort of close. When you asked about routes. But actually it was the location to the templates.


here the 'articles' is part of the URL: http;//

ArticlesController should be self explanatory.

SapporoGuy left a reply on Test • 10 months ago

Q: Why did the did the programmer using Eloquent leave his wife?

A: She had one-to-many relationships

7th November, 2017

SapporoGuy left a reply on Website In Subdirectory/location (nginx) • 10 months ago

I don't use ngnix but my guess is going to be the like:

root /var/www;

I probably would write it as:

root /var/www/sub_directory/your_laravel_project_name;

To be more answer friendly:

root /var/www/ClientA/LaravelCMS;

That is if you have several projects for a Client. If not just put your laravel code within the ClientA directory.

SapporoGuy left a reply on User Assigning With Role/Permission With Respect To Plant • 10 months ago

You could possibly assign roles according to that company's corporate structure. Then those roles would given certain permissions according to business logic,

SapporoGuy left a reply on Is There A Way Remove Index.php In Laravel Without Changing .htaccess • 10 months ago

Have them add it directly to the server config file.

Basically, my minor understanding to shut off htaccess to users is to prevent dumb people doing dumb things like screwing up the redirect to create loops. The biggest security issue I can think of is using the htaccess to point to dangerous files. But ... in this case, the hosting company already has trouble because ftp access has been gotten and a lot more could happen.

,Anyway, get them to add it to the config file directly which is actually the best way to do this.

SapporoGuy started a new conversation Clean Coding Standards Check Technologies? What Would You Recommend? • 10 months ago

Having finally switched to 5.5 I also want to switch to code review standards and noticed StyleCI but also was wondering what other services are out there that I should look at or implement. My goal is to finally start making my code cleaner over a long haul project. I noticed that a lot of my 5.1 code with more features and tight timelines ends up looking sloppy so I figured that with the new 5.5 release I would put myself on a regiment to prevent my bad habits.

SapporoGuy left a reply on Action Log • 10 months ago

Take a look at Spatie's log package.

Or just look into Laravel's log function. It's simple but works.

Here is a boiler plate that has implemented this:

Don't reinvent the wheel, unless you have to ;-)

6th November, 2017

SapporoGuy left a reply on Database Design Choice • 10 months ago

Yes and No. It all depends on what kind of information you are planning to store. You could just go with groups or even an extra column in the user table like "user_type".

My gut feeling on this particular case is to don't use an extra teacher's table and just use the user_id / teacher_id situation like @jontyjago suggested.

Edit Your Profile

Want to change your profile photo? We pull from