This file provides some guidance on best practice, tips and tricks for developing against LoadPartner TMS
The artisan command dev:refresh will clear your database and run the demo seeder to give you a test environment.
sail artisan dev:refresh
// or
php artisan dev:refresh
The following test users will be created
ADMIN:
Email: [email protected]
Pass: password
REGULAR:
Email: [email protected]
Pass: password
This will run PHPStan and generate IDE completions for any actions.
sail artisan dev:check
- Add your new permission enum to
app/Enums/Permission.php
. Make sure you include an entry underlabel()
! - Create a new database migration, call it whatever you want. In the migration, run
App\Enums\Permission::syncToDatabase();
for both up and down. - Run migrations to add your new permissions to the database!
Ensure you have storage linked by running
sail artisan storage:link
We are using a backup sqlite database of US zip3s to timezone esimates. If you are trying to override the lookup you can define your own db connection under config/database.php
or with the ZIP3_TO_TIMEZONE_OVERRIDE_DB_DATABASE
env naming.
The CreateOrganizationDefaults
action is responsible for adding defaults to any new organizations upon creation. This actions is automatically run anytime an organization is created via the created
hook on the model itself.
If you need to alter the default values of existing organizations, a migration is required. If you want to just change defaults moving forward, you can modify the defaults action. ** NOTE ** When making changes to defaults, it's recommended to consider both a migration AND an update to the defaults action, so that both existing and new organizations will be correctly updated!