You must install Node JS with NPM (Node Package Manager), Composer and Git. You could check installed versions in console:
node -v
npm -v
git clone https://github.com/stacksavings/Laravel-Modular.git .
This option can be used in C9
git clone https://github.com/stacksavings/Laravel-Modular.git folderName
In console, run the follow comand:
# In current folder
composer install
# In custom folder
cd folderName/
composer install
In the root folder, run the follow command in console:
npm run dev
For each change in CSS and JS, you must run this command to execute tasks in webpack.mix.js file. Only for SASS CSS, EcmaScript 6 and packages installed with NPM. Also, if you want to compile custom files CSS and JS. More info: Laravel Mix
Copy .env.example file as .env file. Edit it:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=dbName
DB_USERNAME=mySqlUser
DB_PASSWORD=secret
FACEBOOK_ID=FacebookID
FACEBOOK_SECRET=FacebookKey
FACEBOOK_URL=/auth/facebook/callback
I will send you these data of Facebook Authentication.
Migrations will install Database's tables:
php artisan migrate
Put in root folder the client_secret.json file, which I will send you in an Email. This file is linked in config/spreadsheets.php:
'client_secret' => '../stacksavings-12345678890.json
You must configure the host virtual of project. Application startup is in /public/index.php.
cd /etc/apache2/sites-available
nano 001-cloud9.conf
Change this line,
DocumentRoot /home/ubuntu/workspace
New line,
DocumentRoot /home/ubuntu/workspace/public
sudo su
cd /etc/apache2/sites-available
cp 000-default.conf /etc/apache2/sites-available/hostname.conf
gedit hostname.conf
Host lines,
<VirtualHost *:80>
ServerName www.hostname.dev
ServerAlias hostname.dev
DocumentRoot /home/username/path/to/project/public
ErrorLog /home/username/path/to/logs/errors.log
CustomLog /home/username/path/to/logs/access.log combined
<Directory /home/username/path/to/project/public/>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Enable site,
a2ensite hostname.conf
Restart apache,
service apache2 restart
Config hosts file,
gedit /etc/hosts
Add lines,
127.0.0.1 www.hostname.dev
127.0.0.1 hostname.dev
use App\Stacksavings\Spreadsheet;
$sheet = new Spreadsheet();
$data = $sheet->read(config('spreadsheets.worksheet'))->get();
# Example 2
$sheet = new Spreadsheet();
$data = $sheet->read('worksheetName')->get();
File /config/spreadsheets.php
'name' => 'StackSavings',
'spreadsheet' => 'SheetsLayout-1',
'worksheet' => 'livre-lead_testimonial', # Optional
'client_secret' => '../stacksavings-18347e7f1ecf.json'
steps to upgrade php version:
https://community.c9.io/t/laravel-5-3-installation-on-cloud9/9038