Comment on page
tip This installation guide is for latest version, if you are installing an older version of laravel, please find it's instructions in the left menu. :::
This Installation guide has been split into 3 parts
- after setup
To use JOSH which is a developer-oriented product, you should have a basic idea of following tools and make sure they are installed in your system.
you can check if you have git by running
git --versionin terminal, if you don't have it...you can get it from git-scm.com
or on *nix system, you can install by running
apt-get install gitcommand
you can check if you have nodejs installed or not by running
nodejs -vin terminal, if you don't have it... you can get it from nodejs.org
you can check for composer existence by running
composer -vin terminal and if you don't have it, get it from getcomposer.org
The zip file contains all laravel files integrated with josh, however, you need to perform the following steps to get vendors etc.
Since everyone can have their own database name, mail settings etc, laravel doesn't ship with
.env.examplewhich we copy as
.envand modify with our DB details etc.
cp .env.example .env
For Windows Users
copy .env.example .env
.envand modify database etc. details with yours
you need to modify the following values
you may need to change other fields as well, if necessary
We don't add all vendors files into zip, hence you need to get them manually, running below command can get you all composer vendor packages
::: tip Windows users don't need follow these steps :::
Laravel requires directories within the
bootstrap/cachedirectories should be writable by your web server
You should use the minimum permissions available for writing, based on how you've got your web server configured.
chmod -R 775 storage
chmod 775 bootstrap/cache
If you still run into a permissions error, you may need to increase the permissions to 777, or twiddle your user/group permissions on your server.
chmod -R 777 storage
chmod 777 bootstrap/cache
You'll also want to make sure that your laravel directory and all files within are owned by something other than root. It's very common to create a user on your server (like www-data), add that user to the apache group, and then chown your files to be owned by www-data, chgrp to the apache group.
This ensures your files can be executed correctly and cache files can be written to without having to give files owned by root the permissions to write or execute.
If you want to send emails from your website, you need to configure
MAIL_DRIVERetc details in your
.envfile, if you don't want to send emails (ex: in dev environment), you can set
logand it will write all your emails to log files.
::: tip Global 'from' address You can specify
fromaddress from each email from
mailableshowever if you wish to have a single global
fromaddress then please modify
config/mail.phpbelow section with your values
To secure user sessions and other encrypted data, we need to set application key.
php artisan key:generate
Now that, we have set up database details in
.env, its time to migrate tables into database.
To have default admin user, we need to seed data into DB, to do that run below command, which inserts two users into the database along with two roles
php artisan migrate --seed
along with users, it also inserts all countries data into
::: tip If you want to have some dummy data in datatables examples, please run
php artisan db:seed --class=DatatablesSeeder:::
Now we need to get frontend assets and move them to the proper place, please run the following commands.
npm run dev
if everything compiles successfully, by now you should have a working website
Still, we need to get some keys and set up things to make sure josh is working properly
::: tip Windows users don't need to follow these steps :::
we need to provide write permission to the following folder