diff --git a/docs/installation.md b/docs/installation.md index 7f48f49..227098e 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -15,7 +15,7 @@ return [ After this, address should be listed among the concord modules: -``` +```text php artisan concord:modules -a +----+-----------------------+--------+---------+------------------+-----------------+ diff --git a/docs/seeders.md b/docs/seeders.md index 52bf178..5ecbe10 100644 --- a/docs/seeders.md +++ b/docs/seeders.md @@ -16,6 +16,31 @@ This package contains the following seeders in the `src/resources/database/seeds | `StatesOfGermany` | [Province](province.md) | States of Germany (Bundesland) | | `StatesOfUsa` | [Province](province.md) | States, DC, territories and military areas of the USA | +## Loading + +### With Artisan + +```bash +php artisan db:seed --class="\Konekt\Address\Seeds\Countries" +``` + +### Adding To Your App's DatabaseSeeder + +```php +class DatabaseSeeder extends \Illuminate\Database\Seeder +{ + public function run() + { + //... + $this->call(\Konekt\Address\Seeds\Countries::class); + //... + } +} +``` + +> For more details refer to the [seeds section](https://konekt.dev/concord/1.3/seeds) in the Concord +> docs. + ## The Countries Seeder Besides using as a standard Laravel Seeder, the countries seeder can also be used as a standalone class to retrieve the @@ -26,6 +51,8 @@ countries of the world. ### Get All Countries ```php +use Konekt\Address\Seeds\Countries; + Countries::all(); // [ // 'AF' => ['id' => 'AF', 'name' => 'Afghanistan', 'phonecode' => 93, 'is_eu_member' => 0], @@ -106,27 +133,4 @@ $seeder = ProvinceSeeders::make('regions-of-absurdistan'); $seeder->run(); ``` -## Loading - -### With Artisan - -```bash -php artisan db:seed --class="\Konekt\Address\Seeds\Countries" -``` - -### Adding To Your App's DatabaseSeeder - -```php -class DatabaseSeeder extends \Illuminate\Database\Seeder -{ - public function run() - { - //... - $this->call(\Konekt\Address\Seeds\Countries::class); - //... - } -} -``` -> For more details refer to the [seeds section](https://konekt.dev/concord/1.3/seeds) in the Concord -> docs. diff --git a/docs/utils.md b/docs/utils.md index cd24bb6..565dbca 100644 --- a/docs/utils.md +++ b/docs/utils.md @@ -97,7 +97,7 @@ Usage example: ```php class ShippingMethod extends Model { - uses Zoneable; + use Zoneable; } $haitiShippingZones = Zones::withShippingScope()->theCountryBelongsTo('HT');