Packdev
Packdev is a laravel package to help you develop a laravel specific package. It will automatically set the paths needed and simulate it like when you are on laravel environment.
Note
| Laravel version |
Package version |
| 5.5.* |
1.0.* |
| 5.6.* |
1.1.* |
| 5.7.* |
1.2.* |
| 5.8.* |
1.3.* |
| ^6.0 |
1.4.* |
Instalation
composer require kastengel/packdev --dev
Service providers and Aliases
To register service providers and aliases, do it in composer.json and this package will be simulate your package to be discovered by laravel package discovery.
Paths
This package reregister laravel path. Below is the structure of the path
- "bootstrap" directory is located at packdev directory "vendor/kastengel/pacdev/bootstrap"
- "public" directory is located at packdev directory "vendor/kastengel/pacdev/public"
- "resources" directory is located at laravel skeleton directory "vendor/laravel/laravel/resources"
- "storage" directory is located at laravel skeleton directory "vendor/laravel/laravel/storage"
- "database" directory is located at laravel skeleton directory "vendor/laravel/laravel/database"
- "config" directory is located at laravel skeleton directory "vendor/laravel/laravel/config"
- "base path" is located at your package root dir
Your package factories will automatically loaded during test run.
Artisan
To use artisan, use this package artisan at "vendor/kastengel/packdev/artisan". Because of paths modification, this package provide some commands in order to apply your package context. Below are the custom commands
- dusk:pacdev-install : Install laravel dusk scaffolding
- dusk:pacdev-make : Create new dusk test
- dusk:pacdev-page : Create new dusk page
- make:packdev-factory : Create new factory
- make:packdev-migration : Create new migration
- make:packdev-model : Create new model
- make:packdev-seeder: Create new seeder
- make:packdev-test : Create new test
- vendor:link : Package assets linking by creating symlink instead of copying
Tests
To run test, run this following command
phpunit
php artisan dusk