Laravel application for a self storage company.
- Docker
- Rename the .env file and set any needed settings. By default you shouldn't need to set anything.
mv .env.example .env
- Execute the following initial setup (used to install compser and get the needed vendor files without needing a proper local setup)
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php81-composer:latest \
composer install --ignore-platform-reqs
- create a bash/terminal alias to access sail. Note: you can alteratively call sail from
./vendor/bin/sail
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
- Start up sail. The
-d
flag will allow docker to run in the background.
sail up -d
- Generate a unique laravel key to be added to your local .env file.
sail artisan key:generate
- Install node_modules and build the application.
sail npm i && npm run dev
sail artisan migrate:fresh --seed
default admin credentials: [email protected]
| password
See data is generated from DatabaseSeeder.php
After running sail up
, you can access the site via http://localhost
The root directory has your package.json, webpack files and node modules, however javascript code should be built in the /resources/
directory. Webpack will then bundle the files and drop them into the /public
directory.
To reference files relative to the resource/js directory, use the @ symbol.
For example, to reference /resources/js/Components/Button.jsx
, you would use import Button from '@/Components/Button';
Files are compiled with Laravel Mix
Please visit the sail documentation for details on using sail. Most laravel, composer and npm commands should be preceeded with the sail
command.
This project is tested with BrowserStack.