composer create-project laravel/laravel [project domain]
ansible-playbook ansible/site-create.yml -e "domain=[project domain]" -l vagrant
subl /etc/hosts
- Create Repo on GitHub
git init
git remote add origin [git url]
git push -u origin master
- Grant Access to Teammates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
|-------------------------------------------------------------------------- | |
| Detect The Application Environment | |
|-------------------------------------------------------------------------- | |
| | |
| Laravel takes a dead simple approach to your application environments | |
| so you can just specify a machine name for the host that matches a | |
| given environment, then we will automatically detect it for you. | |
| | |
*/ |
- Update mysql script with user: codeup
- Run mysql user create script (codeup): ansible-playbook ansible/mysql-user-db.yml -l digital_ocean -e "mysql_admin=true"
- Connect to server via SequelPro.
- Update mysql script to add codeup user.
- Run site create script: ansible-playbook ansible/site-create.yml -l digital_ocean -e "domain=myblog.com" --ask-sudo-pass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//move uploaded files to the upload directory | |
if (count($_FILES) > 0 && $_FILES['file1']['error'] == 0) { | |
if ($_FILES['file1']['type'] == 'text/csv'){ | |
$upload_dir = '/vagrant/sites/codeup.dev/public/uploads/'; | |
// Grab the filename from the uploaded file by using basename | |
$filename = basename($_FILES['file1']['name']); | |
// Create the saved filename using the file's original name and our upload directory | |
$saved_filename = $upload_dir . $filename; | |
// Move the file from the temp location to our uploads directory |
NewerOlder