Initializing Laravel¶
Initializing an Empty Laravel Project¶
Create an empty directory and a Reward Laravel environment
$ mkdir ~/Sites/your-awesome-laravel-project $ reward env-init your-awesome-laravel-project --environment-type=laravel
Sign a new certificate for your dev domain
$ reward sign-certificate your-awesome-laravel-project.test
Bring up the Reward environment
$ reward env up
Create the laravel project in the php container
$ reward shell $ composer create-project --no-install --no-scripts --prefer-dist \ laravel/laravel /tmp/laravel-tmp $ rsync -au --remove-source-files /tmp/laravel-tmp/ /var/www/html/
Install the composer packages and create an app key
$ reward shell $ composer install $ php artisan key:generate --show # Add the previously generated key to your .env file with your favourite editor # It should be added using the following format APP_KEY=base64:yourkey # Import the new .env content to the runtime environment variables $ source .env # Generate your config cache $ php artisan config:cache
Initializing a Laravel Backpack Demo Project¶
Clone the code and initialize a Laravel Reward environment
$ git clone https://github.com/Laravel-Backpack/demo.git ~/Sites/demo $ cd ~/Sites/demo $ reward env-init demo --environment-type=laravel
Sign a new certificate for your dev domain
$ reward sign-certificate demo.test
Bring up the Reward environment
$ reward env up
Install the composer packages and initialize the database
$ reward shell $ composer install $ php artisan key:generate --show # Add the previously generated key to your .env file with your favourite editor # It should be added using the following format APP_KEY=base64:yourkey # Import the new .env content to the runtime environment variables $ source .env $ php artisan migrate $ php artisan db:seed
Note
Now you can reach the project on the following url:
The default admin credentials are the following:
user: admin@example.com pass: admin