Skip to content

An opinionated, strongly-typed starting point for Laravel applications

Notifications You must be signed in to change notification settings

MariosIgkiempor/laratype-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About the Template

A Laravel application template focusing on 100% test & type coverage, and maximum static analysis.

It is built on top of Laravel Jetstream and includes the following tools pre-configured with sensible (strict) defaults:

Getting Started

cp .env.example .env

Update the .env file with your APP_NAME, APP_URL, local database credentials. Feel free to change any other variables to fit your local environment needs.

composer install
npm install && npm run build
touch database/database.sqlite
php artisan key:generate
php artisan migrate
vendor/bin/pest --update-snapshots
composer refactor # read note below

Warning

Rector may complain when you composer install or composer require because these commands can overwrite files in your /bootstrap directory. Simply run composer refactor to make Rector happy 👼

At this point, you can start the development server with composer dev.

You can run composer test, which should yield a passing test suite, with 100% test and type coverage.

Tools

Tools are exposed as Composer scripts.

composer test                 # @test:refactor && @test:lint
                              # && @test:types && @test:static-analysis && @test:unit

# `composer test` will run the tools in the following order:
composer test:refactor        # rector --dry-run
composer test:lint            # pint --test && prettier --check resources/
composer test:type            # pest --type-coverage --colors=always --memory-limit=512M --min=100
composer test:static-analysis # phpstan analyse --ansi --memory-limit=512M
composer test:unit            # pest --colors=always --coverage --parallel --min=100

# Tools are also individually exposed as separate scripts:
composer lint                 # pint && prettier --write resources/
composer lint:php <file>      # pint <file>
composer lint:blade <file>    # prettier --write <file>
composer refactor             # rector

License

The Laravel framework is open-sourced software licensed under the MIT license.

About

An opinionated, strongly-typed starting point for Laravel applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages