- PHP
>= v8.1and Composer>= v2.0 - Node.js
>= v16.0and PNPMv8.x - Database Server (MySQL, MariaDB or PostgreSQL)
-
Clone the repository and
cdinto itgit clone git@github.com:creasico/laravel-project.git my-project && cd $_
-
Install
composerandpnpmdependencies -
Copy
.env.examplefile to.envfile & generate new app key -
Create new database and update your
.envfile accordingly# for MySQL (presumably you've already have mysql client) $ mysql -e 'create database <db-name>' # for PostgreSQL (presumably you've already have postgresql client) $ createdb <db-bame>
-
All things set? then run
$ php artisan migrate --seed # run database migration $ pnpm build # compile front-end assets
-
You're good to go
This project is using windi.css and vue.js with inertia.js as default front-end library, which mean any changes you've made, won't appears immadiately unless you run the following command
$ pnpm devThis skeleton is already have pre-configured for testing using built-in and official testing utility of Laravel Framework, which is phpunit and laravel dusk.
All we need to do is spare another database for testing. The reason behind it is while we run our tests, it will reset all of our existing development database. For more information please consult to the official documentation.
Once you've create new database, you can copy your .env file to .env.testing and update the database configuration with the newly created database.
$ composer test:unit # to run unit testBefore you begin tests using laravel dusk, please make sure you've already install the webdriver with the following command
$ php artisan dusk:chrome-driver --detectBy default that command will install the latest ChromeDriver meaning you'll have to make sure that the installed version of ChromeDriver matches with version of your locally installed Google Chrome, then run
$ composer test:e2e # to run end-to-end test using larvel-duskBy default laravel dusk will runs headlessly, if you willing to disable headless mode, just uncomment DUSK_HEADLESS_DISABLED in your .env.testing file. For more info please consult to the official documentation
Note The
.env.examplealso preconfigured withBROWSERSTACK_USERNAMEandBROWSERSTACK_ACCESS_KEYwhich is necessary to run integration testing on BrowserStack, feel free to comment out those variables if you don't want to run it locally. Please consult to their official documentation for local testing.
- Commit Convention: This project follows Conventional Commits using @commitlint/config-conventional as standart, so make sure you follow the rules.
- Code Style: This project uses
Laravel Pintwithlaravelpreset and@antfu/eslint-configas coding standard, so make sure you follow the rules. But don't worry, your VSCode should handle it for you. Please consult to this config for more info.
The project is an open-source software licensed under the MIT license.
