Installation
Create project with composer
composer create-project appdezign/lara-cms-project myapp --prefer-dist
Install NPM
cd myapp
npm install
Publish vendor files
php artisan vendor:publish --tag=lara
Create client theme
cp -R ./laracms/themes/demo ./laracms/themes/myclient
The .env file
Copy .env
cp ./.env.example ./.env
Edit .env
APP_ENV=local
MIX_PARTIAL_PROCESS=
MIX_PROCESS_CSS_ONLY=false
LARA_FRONT_BS_VERSION=5
LARA_PARENT_THEME=base
LARA_CLIENT_THEME=myclient
Run webpack / mix
npm run "mix dev"
Create database (mysql)
Create a database and a database user, and edit the relevant lines in the .env file. Check the /config/database.php file for the available database connections.
DB_CONNECTION=mysql57
DB_DATABASE=d80_myapp
DB_HOST=localhost
DB_PASSWORD=secret
DB_PORT=3306
DB_USERNAME=u80_myapp
Edit the App Url
APP_URL=https://www.example.com
Setup
Run setup
Make sure that the LARA_NEEDS_SETUP is set to true in your .env file, and run setup
https://www.example.com/setup
If the setup wizard has completed successfully, the LARA_NEEDS_SETUP variable will be set to false by the wizard, and you will be redirected to the backend dashboard.
SASS
Deploy on web server
If you publish the app to a web server, you should move all project folders (except public) one level down, and put them in a folder called /laravel. If you are using a shared server (e.g. Plesk) and your server uses a public folder with a different name (e.g. httpdocs), you should move all public files and folders from /public to /httpdocs. You can then delete the (empty) public folder.
Your folder structure should look like this now:
/httpdocs
/assets
/laravel
/app
/bootstrap
/config
...
You should now edit your .env file:
LFM_PUBLIC_BASE_DIR=../httpdocs
... and your webpack.mix.js file:
const PUBLIC_ASSET_PATH = './../httpdocs/assets/';
... and, if necessary, the bootstrap/app.php file
$app->usePublicPath(realpath(base_path('../httpdocs')));
Last updated