Coder Social home page Coder Social logo

ro-addresses's Introduction

Romanian Addresses

Codacy Badge StyleCI License Total Downloads Latest Stable Version

Romanian Addresses extension for Addresses, 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 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.

This package depends on the Addresses 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.

ro-addresses's People

Contributors

aocneanu avatar gandesc avatar gitmanuela avatar vmcvlad avatar y0net avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ro-addresses's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.