{"repo":"Lecturize/Laravel-Addresses","free":true,"listed":false,"github":"https://github.com/Lecturize/Laravel-Addresses","clone":"git clone https://github.com/Lecturize/Laravel-Addresses.git","description":"Simple address and contact management for Laravel.","language":"PHP","stars":200,"topics":["laravel","laravel-addresses"],"license":"MIT","category":"databases-storage","readme_excerpt":"Laravel Addresses Simple address and contact management for Laravel with automatical geocoding to add longitude and latitude. Installation Require the package from your composer.json file and run $ composer update or both in one with $ composer require lecturize/laravel-addresses . Configuration & Migration This will publish the config file to config/lecturize.php and some migration files, that you'll have to run: For migrations to be properly published ensure that you have added the directory database/migrations to the classmap in your projects composer.json . Check out Webpatser\\Countries readme to see how to seed their countries data to your database. Usage First, add our HasAddresses trait to your model. Add an Address to a Model Alternativly you could do... Available attributes are street , street extra , city , post code , state , country , state , notes (for internal use). You can also use custom flags like is primary , is billing & is shipping . Optionally you could also pass lng and lat , in case you deactivated the included geocoding functionality and want to add them yourself. Check if Model has Addresses Get all Addresses for a Model Get primary/billing/shipping Addresses Update an Address for a Model Delete an Address from a Model Delete all Addresses from a Model Contacts First, add our HasContacts trait to your model. Add a Contact to a Model Relate Addresses with Contacts Above all, addresses and contacts can be connected with an optional One To Many relations","default_branch":null,"files":null,"tree":[],"storefront":"/r/Lecturize","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Lecturize/Laravel-Addresses/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}