jwcobb/laravel-toolkit

A collection of things I use in nearly every Laravel app.

dev-main 2023-07-03 07:48 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

What's included:

  • Config
    • site (where I like to define miscellaneous stuff related to the app/site)
  • Helpers
    • Common: General helper functions
    • Forms: Things I use when creating <form>s
    • Tickets: Functions used with ticket resale stuff
  • Migrations
    • Create email_addresses table
    • Create phone_numbers table
    • Create street_addresses table
  • Models
    • EmailAddress
    • PhoneNumber
    • Address
    • HasPrimary (trait)
  • Presenters (uses datacreativa/laravel-presentable)
    • EmailAddressPresenter
    • PhoneNumberPresenter
    • StreetAddressPresenter

Installation

You can install the package via composer:

composer require jwcobb/laravel-toolkit

You can run some interactive scripts to set some things up and install common packages via Composer

php artisan laravel-toolkit:install

You can publish and run the migrations with:

php artisan vendor:publish --tag="toolkit-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="toolkit-config"

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.