Welcome to the Laravel application. This project is built on one of the most popular PHP frameworks, Laravel (v11.39.1), known for its powerful features and elegant syntax. The application leverages MySQL for its database and provides an efficient and scalable development environment for various web solutions.
- Laravel Framework version 11.39.1 with modern PHP (^8.2) features.
- Database: MySQL support for robust and reliable data management.
- Queue System: Configured with a
database
queue connection for efficient job handling. - Frontend:
- TailwindCSS for modern responsive design.
- Vite for fast and efficient asset bundling.
- Ecosystem Tools:
npm
for managing frontend dependencies.Composer
for backend dependency management.
- Testing:
- Pest for elegant and extensible test writing and execution.
- PHP: 8.2 or higher
- Database: MySQL 5.7+ / MariaDB 10.3+
- Node.js: 16.x or higher (with npm)
- Composer: Latest version
Follow these steps to set up and run the application on your local environment.
git clone https://github.com/unsta/laravel-initial-setup
cd laravel-initial-setup
-
Install PHP dependencies with Composer:
composer install
-
Install JavaScript packages with npm:
npm install
-
Copy the
.env.example
file to.env
:cp .env.example .env
-
Update the
.env
file with your database credentials and other application configuration values.
Run the following command to generate an application encryption key:
php artisan key:generate
Run the database migrations to create required tables:
php artisan migrate
For building and bundling frontend assets, use:
npm run dev
For production builds:
npm run build
php artisan serve
This will serve the application at http://localhost:8000.
For a containerized development environment, use Laravel Sail:
./vendor/bin/sail up
The project includes tests written with the Pest testing framework. Run tests using the following command:
php artisan test
The app uses a database
queue driver. To process jobs, start the queue worker:
php artisan queue:work
- Laravel Framework (v11.39.1)
- Guzzle (v7.9.2): For HTTP requests.
- Monolog (v3.8.1): Logging library.
- Faker PHP (v1.24.1): For generating dummy data in tests or seeds.
- Dragonmantank/Cron-Expression (v3.4.0): Used for powerful CRON expressions.
- axios (v1.7.4): For HTTP requests in JavaScript.
- tailwindcss (v3.4.13): TailwindCSS framework for styling.
- vite: Asset bundler for Laravel.
- postcss (v8.4.47) and autoprefixer (v10.4.20) for CSS processing.
Below are a few commonly used Artisan commands for managing the app:
-
Clear cache:
php artisan optimize:clear
-
Run migrations:
php artisan migrate
-
Seed the database:
php artisan db:seed
-
Start the queue worker:
php artisan queue:work