Clone the repository and ensure the followings are installed:
- PHP 8.2/8.3
- PHP Composer
- NPM
- SQLite
-
Install all necessary PHP dependencies.
composer install
-
Install all necessary Node.js dependencies.
npm install
-
Copy
.env.exampleto.envin the project root.cp .env.example .env
-
Generate a unique application key.
php artisan key:generate
```bash
php artisan storage:link
```
-
Run the migration command
php artisan migrate --seed # if already setup, run php artisan migrate:fresh --seed # This will clear the database with new data
-
When prompted to create a new SQLite database, type
yes. -
Seed the database with dummy data.
php artisan migrate:fresh --seed
Ensure you are in the root directory and run the following commands:
-
Start the Laravel development server.
php artisan serve # or use Herd (https://herd.laravel.com/) -
Generate ide helper.
composer run ide
-
Start the frontend development server.
npm run dev
-
The application should now be accessible on port
8000(orhttp://cloudnativemauritius.com.teston herd) -
Advanced dev tool available on
<host>/__clockwork
Set VITE_HMR_HOST to the local IP address of your machine. You'll also have to update the APP_URL
To quickly get the ip, run npm run dev -- --host and you'll see something like Network: http://x.x.x.x
VITE_HMR_HOST=192.168.100.200Run php artisan serve --port 8000 --host 192.168.100.200 and npm run dev -- --host
In this case, if your phone is connected to the same network, you should be able to access the site on your phone on 192.168.100.200:8000