LaravelLand - literally

Member Since 1 Year Ago

Experience Points 8,640
Lessons Completed 60
Best Reply Awards 3
Best Answer
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement


    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement


    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

20 Nov
3 weeks ago

SapporoGuy left a reply on Side Projects???

@VINNIE1991 - For your situation, I would suggest Race Car Queens!

Oh wait ... that's focusing in the wrong direction.

15 Nov
1 month ago

SapporoGuy left a reply on LARAVEL MODULAR DEVELOPMENT

I use this nWidarts modules is good but I don't like all that fluff.

SapporoGuy left a reply on Live Pair Programming

Thanks for offering the community this service!

Who cares if it's recorded or not. The thought is awesome!

SapporoGuy left a reply on One Controller Or Duplicate N Times?

It all depends on DRY.

If you can keep some functionality together I would. I use repositories for this. I have separated my User Controllers before and do it because it makes sense like @tykus said. However, my difference would be that I call them AdminController, ClientController and EmployeeController (using resourcecontroller here would be confusing since resource has a different meaning in laravel).

SapporoGuy left a reply on Movies Not Working

@LUCKYPAJI - This has happened before. If you can watch youtube then it's not your audio driver but how laracasts is delivering the videos.

SapporoGuy left a reply on What Am I Missing Out If I'm Not Using A VM/Container For My Development Setup?

@ALCHERMD - We all like hipster points.

I remember the big docker crae here on laracasts about 2 years ago and a few other trends. Now, we Jeffery is saying, "do what works".

SapporoGuy left a reply on What Am I Missing Out If I'm Not Using A VM/Container For My Development Setup?


My understanding is that Docker is like a vm but on a smaller scale. You are only including the bare necessities compared to a full vm setup. Also, you can have multiple dockers (what ever they are called) to run microservices and such.

I have run into many situations that you described and I just leave my machine with all those extras in. But I do run vms when the distro is completely incompatible to what I am using.

I run OSX a lot and most people forget that it's not case sensitive like Linux is. This has bit me several times.

SapporoGuy left a reply on What Am I Missing Out If I'm Not Using A VM/Container For My Development Setup?

You are missing out on all the hipster grooves man!

It all depends on the project. I work in an enterprise setup and nobody on the DevOps or Infrastructure side has seen the need for a docker approach yet. We are looking into the benefits and have been putting this off.

I'm sure somebody who uses Docker will be able to give a better detail benefit usage than me.

From my simple understanding, docker has the benefit that everything you need is already packaged up and you don't have to deal with Infrastructure giving you headaches about your requirements.

Still, if your setup works then Docker might just be a great learning experience rather than something you really need. Remember, the net has made it this far and we used to use FTP and folders on our local machines for version control.

06 Nov
1 month ago

SapporoGuy left a reply on Where Would You Move This Code?

@cmdbueno makes a good point about coding to a minimal requirement. Starting off as hobbyist I often wanted to cover lots of cool functionality but in the real world this will cause problems for you at your job. If the requirements want ABC; only do ABC. I used to think this was slacking off but in reality most clients don't care about your cool tweaks or they might start expecting that you can deliver ABCD and expect to be only charged for ABC. For personal projects this is a reason why you have so many unfinished projects - you never get a round to implementing ABC and DEFGHI and J!

Here is a hint about corporate. If they say they want ABC say AB is doable in the time frame and that C might not make it. Of course, don't do that for easy things that won't have many bugs or small changes. Corporate is not a small agency but about budgets and making sure the budget scales out through the year.

SapporoGuy left a reply on Where Would You Move This Code?


Exactly! I noticed this with Jeffery too. His early videos and later ones give different opinions.

Consistency and DRY are 2 things that I really think help an application even if a design decision is not that great, at least, you have code that can read at a later date and don't have to deal with multiple styles.

05 Nov
1 month ago

SapporoGuy left a reply on Where Would You Move This Code?


I had some trouble with repositories when I first learned about them. I did not learn them in school but here in the trenches so please consider this when you read my ideas about them.

When they were the hip thing to do on Laracasts it was all about, " I might change my database from mysql to Maria " and " they also let me set up interfaces where I can see a quick list of all my functions "! Laravel 5.0.0 was really into Repositories!

Jeffery a few months back decided that it was cool to keep things simple so some people jumped on that concept. I was like, " huh?!? After all this talk about using this and that pattern, I can go back to being plain simple to get it done!?! " ... lots of pain.

For me, I like repositories because your function(s) could grow.


Which just grabs all data and slams it into the database.

But what happens if you want to Capitalize First letters, check to see if a user is an adult so you could also add them to a mailing list, or any other type of data changes.

You could just do this in the Controller. If this were just a simple controller and one section needed all kinds of data changing and checking, then I might just do it in the controller but then my controller wouldn't be "pretty'.

Another way to look at a repository file is like I said to keep code DRY. Maybe you might have a few controllers that need to do something with users (it's always the users! lol) so you call the user repository when needed and you can keep your code organized.

What is best practice for this? Honestly, wait another 6 months and I have a feeling some other pattern will be the best practice.

If your code is easy to read, the logic doesn't require a map and you keep consistent across the whole project, then do what you are doing now. I would just focus on DRY and trying to reuse as much code as possible because it will keep you on your toes about function creep.

01 Nov
1 month ago

SapporoGuy left a reply on Moved My Project From 1 Directory To Another And Shows Index File List Now

Did you restart Apache so that it will reread the hosts file and if you are on a ubuntu style server did you dissite and ensite just in case?

SapporoGuy left a reply on Why No Good Blog / Cms Options

Try coaster cms.

The big problem here is that since Laravel's auth method is still relatively open and people end up using spatie or something similar you end up with the problem that it's really hard to make something generic. So, people just roll their own.

Your other choice is to look at projects like asgard or backpack and should use their system.

Also, consider that a permission system is more of a library that a cms would use.

SapporoGuy left a reply on Error Adobesign POST TransientDocument


To be honest, I doubt many people have seen this error and posting back in hour normally doesn't help.

I have no clue what that api does. But take a look at the error. It says that the media type isn't supported. What media types are supported by the api and are you sending a file that is supported by the api? It could also just be that you are not providing the media type to the API.

Have you tried debugging using postman?

29 Oct
1 month ago

SapporoGuy left a reply on Where Would You Move This Code?

I'm still a little older style so I would put the validation part in a validation class like @cronix mentioned then I would create a repository for the store method but you would still need to call that store method from the controller.

I would not store it all in the controller because the store method could grow and might eventually meet other conditions from other controllers.

My models are very lean and basically just set the fill areas and then relationships. It has been years since I used a model like a repository.

Why is bascially to keep things lean and dry.

08 Oct
2 months ago

SapporoGuy left a reply on How Would One Go About Making A Framework For "web Artisans" Today?

Web 1.0 was html, css, (language). Many CMSs carried over. I'd say that WP was still rather new when 1.0 ended.

Web 2.0 was coined with AJAX. FB really took off with their API and later AJAX usage.

Web 3.0 ... hmmm, the OP mentioend "decentralized web" so I'm gonna say that maybe they are talking about bit-chain / torrent technology. Have no idea how they can get rid of server software and php unless they are thinking nodejs or something.

@cmdobueno there is a javascript based laravel that you might want to look at. sorry but I forgot it's name.

05 Oct
2 months ago

SapporoGuy left a reply on Webserver Or Forge Or AWS

I think you will have bigger problems with bandwidth than the servers.

What are you actually worried about?

SapporoGuy left a reply on VSTS For Deployment

Hi @vmitchell85

NOTE to all: VSTS is now Azure DevOPs ... ok, what ever

I did figure this out for a windows IIS setup.

I did not setup the tie between the servers and VSTS since it was already done for me. So, the agent part is still a mystery for me.


  1. Create the build and release procedures
  2. Tie the build to your git repo (I do this directly through VSTS)
  3. set up you tokens for the .env variables
  4. set up the triggers for commits and release
  5. setup your environments' approvals
  6. fire a commit and watch all the automation do it's magic.

I have 2 build/release processes. 1 for the full install and another process just for code updates that don't do composer update. I should look into a better robocopy situation but things are working so far.

I am NOT a windows fan nor like using windows OS. However, VSTS is pretty awesome!

For running Laravel on IIS ... I honestly don't trust the permissions because you can't lock down the install to app_pool groups and have to run I_USRS with open permissions.

18 Jun
5 months ago

SapporoGuy left a reply on Load Balancing Of Authentication And Session, Without Opening Firewall

@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

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.

15 May
7 months ago

SapporoGuy left a reply on Which Laptop To Buy?

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.

09 Apr
8 months ago

SapporoGuy left a reply on Why Laravel?

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

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.

13 Feb
10 months ago

SapporoGuy left a reply on Data Migration From Non-laravel To Laravel App


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

01 Feb
10 months ago

SapporoGuy left a reply on Data Migration From Non-laravel To Laravel App


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

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?


29 Jan
10 months ago

SapporoGuy left a reply on Testing Sequence Order For Laravel Dusk

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

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)

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.

19 Jan
10 months ago

SapporoGuy left a reply on SWITCH TO LINUX

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.

17 Jan
11 months ago

SapporoGuy left a reply on Laravel CMS

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

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

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)

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.

16 Jan
11 months ago

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

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?

15 Jan
11 months ago

SapporoGuy started a new conversation VSTS For Deployment

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

11 Jan
11 months ago

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

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)?


08 Jan
11 months ago

SapporoGuy left a reply on Which Course To Choose?

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

14 Nov
1 year ago

SapporoGuy left a reply on Help With Spatie/Permissions (and Maybe Redis)

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

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?

09 Nov
1 year ago

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

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.

08 Nov
1 year ago

SapporoGuy left a reply on Controller Questions

@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

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

A: She had one-to-many relationships

07 Nov
1 year ago

SapporoGuy left a reply on Website In Subdirectory/location (nginx)

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

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

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?

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

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 ;-)

06 Nov
1 year ago

SapporoGuy left a reply on Database Design Choice

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.