Moving Laravel project from Windows 7 to Raspbian Jessie - laravel

I created a Laravel webapp running on a homestead vm on my Windows 7 machine. I want to take this webapp and move it over to my raspberry pi so it's easily accessible from my other devices, since my decsktop doesn't have a direct connection to my router.
I have my pi setup with apache2 and Laravel all the way to the point that if I create a Laravel project in /var/www using
php ~/composer.phar create-project --prefer-dist laravel/laravel project
Then I can access it through the URL:
192.168.1.232/project/public
However, when I pull the webapp I created on the homestead machine through get and place it in /var/www on the pi, I get a page isnt working, currently unable to handle request error.
Does anyone know what files I would need to change/git ignore to develop Laravel on my windows machine and then pull certain versions to my pi without creating errors?

EDIT: I was able to fix this issue by looking at the git ignored files. Two necessary files, /vendor and .env were being ignored when I pushed my project to git. All I did was recreate the .env file in my project directory on my pi, and move a copy a vendor file over from a project I created on the pi, and my webapp started to work.

Related

Laravel 8 - Envoyer & Homestead Deployment Issues

So I am using Laravel Homestead for my local development. I opted to install it per-project rather than globally so that all of my Homestead configuration files would be tracked in my git repository. To keep my repository clean, I opted to place the entirety of the Laravel application into a sub-directory named 'code'.
This, however, has presented me with a challenge when attempting to deploy my application via Envoyer. It seems as though Envoyer assumes the Laravel application files are in the root directory of the repository. As such, when it attempts to deploy it fails.
I've been searching around and can't seem to find any way of specifying to Envoyer that my Laravel application files are not in the root directory of the repository but are in the 'code' directory. Any help would be greatly appreciated!
Repository Structure:
/
- Homestead related files
- /code
- Laravel application files

local folder not populated when create new project

I am attempting to set up Homestead on a Windows 10 machine using VirtualBox and Vagrant so it can live in a virtual machine.
Using Git Bash, here is the sequence of steps thus far -
connect to Homestead virtual machine using vagrant ssh
run this command to create a new project called Laravel:
look at folders in Homestead directly on VM:
So far, so good.
Now here is where things don't seem to be working properly -
look in storage location on host operating system where Homestead.yaml is configured to park files
but there are no files there
Two questions:
What needs to be changed so the files appear in the designated location on Z:?
Once the change has been made, how will the files appear there when the project has already been created on the VM?
EDIT:
I was able to remove the original Laravel project using the comment below from #dparoli. After cd code I executed composer create-project --prefer-dist laravel/laravel Laravel but encountered the error shown below: [ErrorException] mkdir(): File exists. I'm guessing there's left over stuff from the first attempt. What should be done to clear up the error?

Accessing Lumen public folder from Vagrant

I'm currently experimenting with Lumen from inside an Homestead Vagrant box. My homestead box is up and running, and I accessed the machine with vagrant ssh.
I then created a new folder, and installed Lumen with: composer global require "laravel/lumen-installer". Then I created a new Lumen project with lumen new blog.
This created all the structure of the new Lumen project. My problem is that now, I want to access the project in the browser. So, following the tutorial on the Lumen website I could do this with PHP in built server, like php -S localhost:8000 -t public.
The problem is that I'm inside a Vagrant Homestead machine, so when I try to go to localhost:8000 I get a This site can't be reached. localhost refused to connect error.
Any idea on how can I fix this?

Deploy with Laravel?

First Laravel Project.
I want to deploy my Laravel project to a Hoster. I have FTP access to it, but I don't want to tinker with filezilla everytime I change something. Plus my Development and 'Finished' projects has some differences (for example Debugbar and different DataBase authentication. What's the best method to deploy a Laravel Project?
It can be done in many ways. So I am going to give a headstart.
Warning: This might not be everything you need to know. I recommend you to learn more about, deployment,ssh, version controlling, apache vhosts, etc , this is just a headstart
Here is how I do it on my Ubuntu server with apache, php and mysql.
I use Git for version controlling and bitbucket and github for managing repositories.
1 - make my project a git repository.
2 - push the repo to bitbucket.
3 - connect to the remote server through ssh and setup the apache vhosts, databases etc.
create a vhost /etc/apache/sites-available/somesite.com.conf file
add the entry to /etc/hosts file
4 - pull the repo from bitbucket to remote server, create and bring the required changes to the production .env file
5 - do a composer install
6 - run php artisan key:generate and php artisan migrate
7 - turn on the site
run sudo a2ensite somesite.com.conf
run sudo service apache2 reload
now the site its up and ready to go.

How to deploy a Laravel 5 using composer and FTP

I built a project using Laravel 5 on my dev machine and now I'd like to deploy it.
One solution that came to my mind is to upload everything using FTP but I guess there is a better way.
I uploaded the composer.json but I receive tons of errors.
I have ssh/root access but using GIT is not an option.
Make sure you can use composer binary on your server and you are set
upload every file except vendor folder (you may use some FTPS manager that reads git-ignore file and does not upload ignored files)
set permissions to ./storage folder (browse thru this severfault thread)
make sure your web server root is ./public
create env file (that is not going to be changed ever, until you want) and do not overwrite it with "local" env file.
$ composer install (installs everything from composer.lock)
$ composer update (updates from repositories again, do test on local before updating on production)

Resources