Welcome to Laravel Init, a starter template for Laravel applications. This template comes pre-configured with essential packages and tools, providing a solid foundation for Laravel-based projects.
- Laravel 11.9 Framework: Latest version of Laravel, supporting PHP 8.2.
- Laravel Sanctum: API authentication via personal access tokens.
- PestPHP: Simple and powerful testing framework.
- Code Quality Tools:
- Larastan: PHPStan extension for Laravel to analyze code quality.
- Laravel Pint: Code style fixer based on PHP-CS-Fixer.
- Rector: Automated refactoring and upgrades for PHP.
- Pest Plugins: For type coverage, Laravel integration, and architecture tests.
- SQLite DB Setup: Automated database setup using SQLite for quick development.
- Optimized Laravel Migrations: Ensure seamless database migrations during project setup.
- PHP 8.2 or higher
- Composer
- Node.js & NPM (for front-end tooling if needed)
-
Clone the repository:
git clone https://github.com/your-repo/laravel-init.git
-
Navigate to the project directory:
cd laravel-init
-
Install PHP dependencies:
composer install
-
Create the
.env
file and generate an application key:cp .env.example .env php artisan key:generate
-
Set up the database:
touch database/database.sqlite php artisan migrate
-
Serve the application:
php artisan serve
-
Run unit tests:
composer test
-
Run code linting:
composer lint
-
Run code refactoring checks:
composer refactor
-
Run static analysis:
composer test:types
-
Run architecture tests:
composer test:arch
-
Run code coverage checks:
composer test:code-coverage
-
Run all tests and quality checks:
composer test
-
Run all tests with code coverage:
composer test-code-coverage
- Laravel Sanctum: API token management and authentication.
- Larastan: Static analysis tool for Laravel.
- Pint: Code style linter and fixer.
- Rector: Automated PHP refactoring tool.
- PestPHP: Testing framework with built-in support for Laravel.
- Nunomaduro Laravel Optimize Database: Optimize your database queries.
Feel free to open issues or submit pull requests to improve the template.