{"id":140,"date":"2013-08-04T16:18:57","date_gmt":"2013-08-04T16:18:57","guid":{"rendered":"https:\/\/www.joetannorella.com\/?p=140"},"modified":"2013-08-04T16:18:57","modified_gmt":"2013-08-04T16:18:57","slug":"some-laravel-gotchas-things-to-take-note-of-when-starting-out-with-laravel","status":"publish","type":"post","link":"https:\/\/www.joetannorella.com\/some-laravel-gotchas-things-to-take-note-of-when-starting-out-with-laravel\/","title":{"rendered":"Some Laravel “Gotcha’s” – Things to take note of when starting out with Laravel"},"content":{"rendered":"
I am not a Laravel expert.<\/strong>\u00a0I am writing this blog post as a Laravel amateur<\/strong>. My goal with this is to point other newbies in the right direction with some seemingly common and easily avoided Laravel mistakes. I’ve only been using it for about a week, but I can’t help but think that if I myself had a list of “Gotcha’s” prior to starting out with the framework, maybe I’d be deploying on day 5 instead of day 7.<\/p>\n Despite Laravel’s documentation being pretty good, there are a number of things you need to watch out for if you’ve never used it before.<\/p>\n This one really got to me and took me a while to figure out. Now I know about it it’s ridiculously easy to avoid, but debugging this one took me a good (or bad!) few hours.<\/p>\n The \/vendor\/ directory of Laravel is ignored with .gitignore file(s). When you deploy to your live server via git, you’re going to get an ugly error and generally have a bad time.<\/p>\n You have a few choices here. What I’ve decided to do is simply recursively remove all the .gitignore files from the \/vendor\/ directory. This means they then are included in your next local git commit, and thus on your next pull should be pulled down to the live server.<\/p>\n The “proper” way of solving this issue is by utilising the composer system and running “composer install” and then “composer update” on future deployments.<\/p>\n Another way of getting around this issue is to FTP every time. But I’m not going to recommend this \ud83d\ude42<\/p>\n http:\/\/forums.laravel.io\/viewtopic.php?id=9814<\/p>\n ___<\/p>\n More gotchas coming soon!<\/p>\n","protected":false},"excerpt":{"rendered":" I am not a Laravel expert.\u00a0I am writing this blog post as a Laravel amateur. My goal with this is to point other newbies in the right direction with some seemingly common and easily avoided Laravel mistakes. I’ve only been using it for about a week, but I can’t help but think that if I…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"yoast_head":"\n1) Deploying with GIT? Your Laravel site will not work!<\/h2>\n
Problem:<\/h3>\n
Solution:<\/h3>\n
Recommended reading:<\/h3>\n