This is a simple voting application built with Laravel 11 and Vue 3. Follow the instructions below to set up and run the application on your local machine.
- PHP (version 8.2 or higher)
- Composer
- Node.js and npm
-
Clone the repository to your local machine.
git clone https://github.com/Lipppitt/fidelity-voting.git cd fidelity-voting -
Install PHP dependencies using Composer.
composer install
-
Install JavaScript dependencies using npm.
npm install
-
Compile the assets.
npm run dev
-
Copy the example environment file and configure your environment variables.
cp .env.example .env php artisan key:generate
-
Configure Laravel Sanctum.
-
Ensure the
SESSION_DOMAINandSANCTUM_STATEFUL_DOMAINSare set in your.envfile. For example:SESSION_DOMAIN=localhost SANCTUM_STATEFUL_DOMAINS=localhost:8000
-
Publish the Sanctum configuration file.
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider" -
Run the Sanctum migrations.
php artisan migrate
-
-
Seed the database.
php artisan db:seed --class=PollSeeder
-
Run the development server.
php artisan serve
-
Start the queue worker.
php artisan queue:work
After following the installation steps, you can access the application at http://localhost:8000.
-
To compile assets for production, run:
npm run production
-
To run database migrations, use:
php artisan migrate
-
To run tests, use:
php artisan test