laravel-enso/roaddresses

This package is abandoned and no longer maintained. The author suggests using the laravel-enso/ro-addresses package instead.

Romanian Addreses extension for Addresses Manager

3.0.3 2019-04-04 08:20 UTC

README

StyleCI License Total Downloads Latest Stable Version

Romanian Addresses extension for Addresses Manager, the Laravel Enso package.

Screenshot

Features

  • makes changes to the addresses columns to better fit the Romanian locale
  • comes with two additional tables for Counties and Localities
  • comes with its own customized form for the edit and creation of addresses
  • comes with a personalized configuration
  • comes with its own VueJS components ro-addresses in order to customize the form and the template for the address cards
  • comes with its own trait
  • comes with an import that updates localities

Usage

  • add the package's AppServiceProvider to the config/app.php list of providers (package auto-discovery is not used as loading order is important)
  • run the migrations, as they change the addresses table, add two other tables, and insert all the localities
  • the configuration should be published, and inside you need to define the addresable types
  • for the models you want to make addressable, you should use the Addresses Manager package's Addresable trait.
  • publish the VueJs component.
  • insert the RoAddreses vue component where required. It takes the same parameters as Addresses - id and type being the essential ones.
<ro-addresses :id="modelId" type="model_class">
</ro-addresses>

where

  • modelId is the addressable model id
  • model_alias is the respective model class

Import

If you need to use the import, publish the included template, importer and validator, and add the new import to your configuration:

'localitiesUpdate' => [
    'label' => 'Localities Update',
    'template' => 'app/Importing/Templates/localityUpdate.json',
    'importerClass' => 'App\Importing\Importers\LocalityUpdateImporter',
    'customValidatorClass' => \App\Importing\Validators\LocalityUpdateValidator::class,
    'sheetEntriesLimit' => 5000,
    'stopOnErrors' => true,
],

Publishes

  • php artisan vendor:publish --tag=ro-addresses-seeds - the seeders
  • php artisan vendor:publish --tag=ro-addresses-config - configuration file
  • php artisan vendor:publish --tag=ro-addresses-form - form used for creating/editing addresses
  • php artisan vendor:publish --tag=ro-addresses-import - form used for updating localities
  • php artisan vendor:publish --tag=enso-config - a common alias for when wanting to update the config, once a newer version is released
  • php artisan vendor:publish --tag=ro-addresses-assets - the VueJS component,
  • php artisan vendor:publish --tag=enso-assets - a common alias for when wanting to update the VueJS component, once a newer version is released
  • php artisan vendor:publish --tag=enso-seeders - a common alias for when wanting to update the seeders, once a newer version is released

Notes

The Laravel Enso Core package does NOT come with this package included, only with the generic Addresses Manager.

This package depends on the Addresses Manager and it does not work standalone.

Contributions

are welcome. Pull requests are great, but issues are good too.

License

This package is released under the MIT license.