Laravel Q/A
Laravel Q/A is an application that replicate StackOverlow. Users can ask a questions or answer other user's questions.
Installation
- Download the code by clicking Code, Download ZIP. Or if you have Git install in your machine, you can run this in your teminal.
git clone [email protected]:tutsprime/laravel-qa.git
- Change directory to your local copy of
laravel-qa
in your terminal. Then install composer dependencies.
composer install
- Copy
.env
file from.env.example
. In NIX machine you can use this command.
cp .env.example .env
- Prepare a database. You can use this command.
mysql -uroot -e "CREATE DATABASE laravel_qa"
If you have password for your database, you need to specify -p
on the command.
- Configure your database settings in
.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_qa
DB_USERNAME=root
DB_PASSWORD=
- Migrate database tables and seed them with fake data
php artisan migrate --seed
- Generate a key for you application
php artisan key:generate
- Generate passport encryption keys
php artisan passport:install
- Install frontend dependencies.
npm install
- Run laravel mix
npm run watch
Your local copy of laravel-qa is ready to access in your browser ;)