https://github.com/evilfreelancer/laravel-lighthouse-example
https://github.com/evilfreelancer/laravel-lighthouse-example
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/evilfreelancer/laravel-lighthouse-example
- Owner: EvilFreelancer
- Created: 2020-10-01T03:10:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-01T05:23:56.000Z (over 4 years ago)
- Last Synced: 2025-03-20T22:09:51.932Z (10 months ago)
- Language: PHP
- Size: 303 KB
- Stars: 8
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel + GraphQL (Lighthouse PHP) demo application
This application based on Docker containers, here is the list:
* mariadb - Database server
* phpmyadmin - For management of MySQL
* laravel - Login pages, API and VueJS
## How to install
### 1. Preparation
Clone the repo and change your work directory to root of sources
```shell
git clone https://github.com/EvilFreelancer/laravel-lighthouse-example.git
cd laravel-lighthouse-example
cp docker-compose.dist.yml docker-compose.yml
cd laravel
cp .env.example .env
conposer install
cd ..
```
In file `docker-compose.yml` you probably will need the change a values to ones you
need, for example you don't need to run this project on `80` port, to
fix that just change line like `80:80` to required values, eg. `7777:80`.
Run first iteration of Docker environment:
```shell
docker-compose up -d
```
### 2. Inside container
Need to login into the Laravel container:
```shell
docker-compose exec laravel bash
```
And fix permissions on a few important folders:
```shell
chown apache:apache {bootstrap,storage,vendor} -R
```
Then exit from container:
```shell
exit
```
### 3. Finish
Login into container
```shell
docker-compose exec laravel bash
```
Create database and seed tables
```shell
php artisan migrate
php artisan db:seed
```
Then exit from container:
```shell
exit
```
## The End
Now you just need open following page http://localhost/graphql-playgroud in your browser.
Thanks for reading!