A simple Laravel Package to sort Countries, States and Cities

Overview

Laravel Location ▲

hero

Introduction 🖖

This Package offers a simple way to get Countries, Cities and States that you may need for your Application, most especially for dropdown menus.

Step One - Install via Composer 🎼

Require the package via composer into your project

composer require ichtrojan/laravel-location

composer install

Step Two - Publish Configurations ⚙️

Laravel location provides you with an easy way of customizing the tables used for storing Countries, States and Cities. Also, you can customisethe route prefix and middleware. To customize these you need to publish the configuration file. To publish the configuration file, run:

php artisan vendor:publish --tag=laravel-location

You will have config/location.php available for you to edit. The default configurations are:

<?php

return [
    'countries_table' => 'countries',
    'cities_table' => 'cities',
    'states_table' => 'states',
    'routes' => [
        'prefix' => 'location',
        'middleware' => 'web'
    ]
];

You can go ahead and customize the table names, route prefix and middleware as you need before running the Migration.

Step Three - Running Migrations

before you do this make sure your correct Database credentials are set in the .env file

php artisan migrate

migrations

Finally, run the Package seeders

php artisan db:seed --class=Ichtrojan\\Location\\Seeds\\LocationDatabaseSeeder

Usage 🧨

NOTE
The routes below are prefixed with location which is the default configuration set in the config/location.php file. If mofified, replace the prefixin your route with the correct prefix.

Route Description
/location/countries return all countries
/location/country/{id} return a single country by its ID
/location/states return all states
/location/state/{id} return a single state by its ID
/location/states/{countryID} return all states in a country using the country ID
/location/cities return all cities
/location/city/{id} return a single city by its ID
/location/cities/{stateID} return all cities in a state using the state ID

Test

composer test

Contribution

Free for all, if you find an issue with the package or if a group of people somehow created a new country please send in a PR.

Danke Schön

Comments
  • Laravel 8: Table Seeder

    Laravel 8: Table Seeder

    Using a clean install of Laravel 8 when running composer dump-autoload Deprecation Notice: Class Ichtrojan\Location\Seeds\StatesTableSeeder located in C:/laragon/www/mapminer4/vendor/ichtrojan/laravel-location/src\database\seeds\StatesTableSeeder.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/laragon/bin/composer/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201

    So when the seeders are run the following error is received: Target class [Ichtrojan\\Location\\Seeds\\LocationDatabaseSeeder] does not exist.

    opened by sahamilton 4
  • Big Seeder File

    Big Seeder File

    Hello,

    Its a feature issue; maybe loading country/city/state data from a json file is better way for seeding. Because currently, editing single file is little bit hard. Maybe we can create 1 nested json data.json or 3 json file countries.json,cities.json and states.json files.

    Its easy for development this package with more contributor.

    PS: This json files can also generated by package developers and contributors.

    opened by erayaydin 3
  • Not All Countries Have States

    Not All Countries Have States

    Hello,

    In Turkey, we have not states. We only have cities and towns. Because of this, there are duplicated items on cities and states. For example; Istanbul in CitiesTableSeeder and also Istanbul in StatesTableSeeder

    opened by erayaydin 3
  • Installation error on laravel 7.2.1

    Installation error on laravel 7.2.1

    Hi,

    I want to use your package on our project. It does not support the laravel version 7.2.1

    Using version ^3.1 for ichtrojan/laravel-location
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Installation request for ichtrojan/laravel-location ^3.1 -> satisfiable by ichtrojan/laravel-location[v3.1.0].
        - Conclusion: remove laravel/framework v7.2.1
        - Conclusion: don't install laravel/framework v7.2.1
        - ichtrojan/laravel-location v3.1.0 requires illuminate/support ^5.0|^6.0 -> satisfiable by laravel/framework[5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev, 6.x-dev], illuminate/support[5.0.x-dev, 5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, 5.8.x-dev, 6.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v5.0.4, v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.36, v5.8.4, v5.8.8, v5.8.9, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.2, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0].
        - Can only install one of: laravel/framework[5.6.x-dev, v7.2.1].
        - Can only install one of: laravel/framework[5.7.x-dev, v7.2.1].
        - Can only install one of: laravel/framework[5.8.x-dev, v7.2.1].
        - Can only install one of: laravel/framework[6.x-dev, v7.2.1].
        - Can only install one of: laravel/framework[5.1.x-dev, v7.2.1].
        - Can only install one of: laravel/framework[5.2.x-dev, v7.2.1].
        - Can only install one of: laravel/framework[5.3.x-dev, v7.2.1].
        - Can only install one of: laravel/framework[5.4.x-dev, v7.2.1].
        - Can only install one of: laravel/framework[5.5.x-dev, v7.2.1].
        - don't install illuminate/support 5.6.x-dev|don't install laravel/framework v7.2.1
        - don't install illuminate/support 5.7.17|don't install laravel/framework v7.2.1
        - don't install illuminate/support 5.7.18|don't install laravel/framework v7.2.1
        - don't install illuminate/support 5.7.19|don't install laravel/framework v7.2.1
        - don't install illuminate/support 5.7.x-dev|don't install laravel/framework v7.2.1
        - don't install illuminate/support 5.8.x-dev|don't install laravel/framework v7.2.1
        - don't install illuminate/support 6.x-dev|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.1|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.10|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.11|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.12|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.13|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.14|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.15|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.16|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.17|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.19|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.2|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.20|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.21|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.22|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.23|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.24|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.25|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.26|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.27|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.28|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.29|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.3|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.30|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.31|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.32|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.33|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.34|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.35|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.36|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.37|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.38|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.39|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.4|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.5|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.6|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.7|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.8|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.6.9|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.1|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.10|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.11|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.15|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.2|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.20|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.21|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.22|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.23|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.26|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.27|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.28|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.3|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.4|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.5|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.6|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.7|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.8|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.7.9|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.11|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.12|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.14|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.15|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.17|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.18|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.19|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.2|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.20|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.22|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.24|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.27|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.28|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.29|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.3|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.30|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.31|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.32|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.33|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.34|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.35|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.36|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.4|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.8|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.8.9|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.0.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.0.1|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.0.2|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.0.3|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.0.4|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.1.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.10.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.11.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.12.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.13.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.13.1|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.14.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.15.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.15.1|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.16.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.17.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.17.1|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.18.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.18.1|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.18.2|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.2.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.3.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.4.1|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.5.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.5.1|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.5.2|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.6.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.6.1|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.6.2|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.7.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v6.8.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support 5.5.x-dev|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.16|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.17|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.2|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.28|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.33|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.34|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.35|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.36|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.37|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.39|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.40|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.41|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.43|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.5.44|don't install laravel/framework v7.2.1
        - don't install illuminate/support 5.4.x-dev|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.4.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.4.13|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.4.17|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.4.19|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.4.27|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.4.36|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.4.9|don't install laravel/framework v7.2.1
        - don't install illuminate/support 5.1.x-dev|don't install laravel/framework v7.2.1
        - don't install illuminate/support 5.2.x-dev|don't install laravel/framework v7.2.1
        - don't install illuminate/support 5.3.x-dev|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.1|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.13|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.16|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.2|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.20|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.22|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.25|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.28|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.30|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.31|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.41|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.6|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.1.8|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.19|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.21|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.24|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.25|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.26|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.27|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.28|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.31|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.32|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.37|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.43|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.45|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.6|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.2.7|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.3.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.3.16|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.3.23|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.3.4|don't install laravel/framework v7.2.1
        - don't install illuminate/support 5.0.x-dev|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.0.0|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.0.22|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.0.25|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.0.26|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.0.28|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.0.33|don't install laravel/framework v7.2.1
        - don't install illuminate/support v5.0.4|don't install laravel/framework v7.2.1
        - Installation request for laravel/framework (locked at v7.2.1, required as ^7.1) -> satisfiable by laravel/framework[v7.2.1].
    
    
    Installation failed, reverting ./composer.json to its original content.
    

    Does the package support version 7.2.1?

    opened by ojnavi32 2
  • Table name should be extendible

    Table name should be extendible

    Hello,

    Currently, table names hardcoded . Maybe with a config variable, we can set extendible for table names. We'll use that config variable on migration,model and seeder files.

    For example;

    return [
      ...
      'tables' => [
        'countries' => 'my_countries',
        'cities' => 'my_cities',
        'states' => 'my_states',
      ]
      ...
    ];
    
    opened by erayaydin 2
  • Cannot truncate a table referenced in a foreign key constraint

    Cannot truncate a table referenced in a foreign key constraint

    I've need to use the cities table as a FK in another table. But the seeders call db:truncate before seeding and thus I get this error:

    Cannot truncate a table referenced in a foreign key constraint (db.addresses, CONSTRAINT addresses_city_id_foreign FOREIGN KEY (city_id) REFERENCES db.cities (id)) (SQL: truncate cities)

    There is no need for db:truncate since we can use migrate:refresh or migrate:fresh to reset the entire database and keep the integrity of the ids.

    PR #30

    opened by cacpmw 1
  • Fetch cities by country

    Fetch cities by country

    This PR attempts to fix the issue raised here #15

    • Added migration to add country_id column to cities table (column check implemented)
    • Seeded the cities country_id by using gotten from the state attached to the city
    • Added tests
    opened by djunehor 1
  • add configurable table name

    add configurable table name

    Hi,

    I saw an issue #17 Then i saw there is a pull request #21, but i think that pr is to complicated and not completed yet for the seeder file.

    So i create a simple resolve.

    Hope it helps.

    opened by lakuapik 1
  • Added illuminate/support ^8.0 for fix problem with installation in laravel 8.x

    Added illuminate/support ^8.0 for fix problem with installation in laravel 8.x

    Also changed | to || in version condition.

    This changes fix problem below:

    Problem 1
        - Installation request for ichtrojan/laravel-location ^3.2 -> satisfiable by ichtrojan/laravel-location[v3.2.0].
        - Conclusion: remove laravel/framework v8.6.0
        - Conclusion: don't install laravel/framework v8.6.0
        - ichtrojan/laravel-location v3.2.0 requires illuminate/support ^5.0|^6.0|^7.0 -> satisfiable by laravel/framework[5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev, 6.x-dev, 7.x-dev], illuminate/support[5.0.x-dev, 5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, 5.8.x-dev, 6.x-dev, 7.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v5.0.4, v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.36, v5.8.4, v5.8.8, v5.8.9, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.10, v6.18.11, v6.18.12, v6.18.13, v6.18.14, v6.18.15, v6.18.16, v6.18.17, v6.18.18, v6.18.19, v6.18.2, v6.18.20, v6.18.21, v6.18.22, v6.18.23, v6.18.24, v6.18.25, v6.18.26, v6.18.27, v6.18.28, v6.18.29, v6.18.3, v6.18.30, v6.18.31, v6.18.32, v6.18.33, v6.18.34, v6.18.35, v6.18.36, v6.18.37, v6.18.38, v6.18.39, v6.18.4, v6.18.40, v6.18.5, v6.18.6, v6.18.7, v6.18.8, v6.18.9, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0, v7.0.0, v7.0.1, v7.0.2, v7.0.3, v7.0.4, v7.0.5, v7.0.6, v7.0.7, v7.0.8, v7.1.0, v7.1.1, v7.1.2, v7.1.3, v7.10.0, v7.10.1, v7.10.2, v7.10.3, v7.11.0, v7.12.0, v7.13.0, v7.14.0, v7.14.1, v7.15.0, v7.16.0, v7.16.1, v7.17.0, v7.17.1, v7.17.2, v7.18.0, v7.19.0, v7.19.1, v7.2.0, v7.2.1, v7.2.2, v7.20.0, v7.21.0, v7.22.0, v7.22.1, v7.22.2, v7.22.3, v7.22.4, v7.23.0, v7.23.1, v7.23.2, v7.24.0, v7.25.0, v7.26.0, v7.26.1, v7.27.0, v7.28.0, v7.28.1, v7.28.2, v7.28.3, v7.3.0, v7.4.0, v7.5.0, v7.5.1, v7.5.2, v7.6.0, v7.6.1, v7.6.2, v7.7.0, v7.7.1, v7.8.0, v7.8.1, v7.9.0, v7.9.1, v7.9.2].
        - Can only install one of: laravel/framework[6.x-dev, v8.6.0].
        - Can only install one of: laravel/framework[7.x-dev, v8.6.0].
        - Can only install one of: laravel/framework[5.4.x-dev, v8.6.0].
        - Can only install one of: laravel/framework[5.5.x-dev, v8.6.0].
        - Can only install one of: laravel/framework[5.6.x-dev, v8.6.0].
        - Can only install one of: laravel/framework[5.7.x-dev, v8.6.0].
        - Can only install one of: laravel/framework[5.8.x-dev, v8.6.0].
        - don't install illuminate/support 6.x-dev|don't install laravel/framework v8.6.0
        - don't install illuminate/support 7.x-dev|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.0.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.0.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.0.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.0.3|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.0.4|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.1.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.10.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.11.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.12.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.13.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.13.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.14.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.15.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.15.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.16.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.17.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.17.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.10|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.11|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.12|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.13|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.14|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.15|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.16|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.17|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.18|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.19|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.20|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.21|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.22|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.23|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.24|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.25|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.26|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.27|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.28|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.29|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.3|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.30|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.31|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.32|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.33|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.34|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.35|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.36|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.37|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.38|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.39|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.4|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.40|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.5|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.6|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.7|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.8|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.18.9|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.2.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.3.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.4.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.5.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.5.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.5.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.6.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.6.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.6.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.7.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v6.8.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.0.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.0.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.0.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.0.3|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.0.4|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.0.5|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.0.6|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.0.7|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.0.8|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.1.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.1.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.1.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.1.3|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.10.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.10.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.10.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.10.3|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.11.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.12.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.13.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.14.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.14.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.15.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.16.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.16.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.17.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.17.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.17.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.18.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.19.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.19.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.2.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.2.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.2.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.20.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.21.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.22.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.22.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.22.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.22.3|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.22.4|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.23.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.23.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.23.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.24.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.25.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.26.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.26.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.27.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.28.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.28.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.28.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.28.3|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.3.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.4.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.5.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.5.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.5.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.6.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.6.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.6.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.7.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.7.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.8.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.8.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.9.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.9.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v7.9.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.6.x-dev|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.7.17|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.7.18|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.7.19|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.7.x-dev|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.8.x-dev|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.10|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.11|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.12|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.13|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.14|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.15|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.16|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.17|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.19|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.20|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.21|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.22|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.23|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.24|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.25|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.26|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.27|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.28|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.29|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.3|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.30|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.31|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.32|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.33|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.34|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.35|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.36|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.37|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.38|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.39|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.4|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.5|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.6|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.7|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.8|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.6.9|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.10|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.11|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.15|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.20|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.21|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.22|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.23|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.26|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.27|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.28|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.3|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.4|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.5|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.6|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.7|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.8|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.7.9|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.11|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.12|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.14|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.15|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.17|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.18|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.19|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.20|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.22|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.24|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.27|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.28|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.29|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.3|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.30|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.31|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.32|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.33|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.34|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.35|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.36|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.4|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.8|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.8.9|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.1.x-dev|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.2.x-dev|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.3.x-dev|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.4.x-dev|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.5.x-dev|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.1|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.13|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.16|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.20|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.22|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.25|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.28|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.30|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.31|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.41|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.6|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.1.8|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.19|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.21|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.24|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.25|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.26|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.27|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.28|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.31|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.32|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.37|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.43|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.45|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.6|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.2.7|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.3.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.3.16|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.3.23|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.3.4|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.4.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.4.13|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.4.17|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.4.19|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.4.27|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.4.36|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.4.9|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.16|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.17|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.2|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.28|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.33|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.34|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.35|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.36|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.37|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.39|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.40|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.41|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.43|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.5.44|don't install laravel/framework v8.6.0
        - don't install illuminate/support 5.0.x-dev|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.0.0|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.0.22|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.0.25|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.0.26|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.0.28|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.0.33|don't install laravel/framework v8.6.0
        - don't install illuminate/support v5.0.4|don't install laravel/framework v8.6.0
        - Installation request for laravel/framework (locked at v8.6.0, required as ^8.0) -> satisfiable by laravel/framework[v8.6.0].
    

    If it`s okay, after approve please update package minor version. Thank you!

    opened by tahrz 0
  • Test to ensure all cities have country

    Test to ensure all cities have country

    Fix for issue #31

    • Added test to check if any city doesn't have country_id
    • Added test to check if any state doesn't have a country_id
    • Added test to check if any city doesn't have state_id

    If all states have a country_id and all cities have a state, then all cities should have a country_id

    opened by djunehor 0
  • Use truncate() instead of delete() to keep IDs consistent

    Use truncate() instead of delete() to keep IDs consistent

    I think it's better to truncate the tables than use delete(); Using delete() will empty the table, but the autoincrement ID remains the same. So, next time the Seeder is run, IDs start counting from the last autoincrement instead of 1. This can lead to inconsistent data. Since all 3 tables are related, the IDs should remain the same irrespective of the number of times the seeders are run.

    Another reason is that using delete() leaves the tendency for duplicates. The name column is not set to be unique. So, each time I run the seeder, an exact data is duplicated in the table.

    opened by djunehor 0
  • problem updating

    problem updating

    Deprecation Notice: Class Ichtrojan\Location\Seeds\CitiesTableSeeder located in C:/wamp64/www/prorealtorreferrals.com/vendor/ichtrojan/laravel-location/src\database\seeds\CitiesTableSeeder.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class Ichtrojan\Location\Seeds\CountriesTableSeeder located in C:/wamp64/www/prorealtorreferrals.com/vendor/ichtrojan/laravel-location/src\database\seeds\CountriesTableSeeder.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class Ichtrojan\Location\Seeds\LocationDatabaseSeeder located in C:/wamp64/www/prorealtorreferrals.com/vendor/ichtrojan/laravel-location/src\database\seeds\LocationDatabaseSeeder.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class Ichtrojan\Location\Seeds\StateCityCountrySeeder located in C:/wamp64/www/prorealtorreferrals.com/vendor/ichtrojan/laravel-location/src\database\seeds\StateCityCountrySeeder.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class Ichtrojan\Location\Seeds\StatesTableSeeder located in C:/wamp64/www/prorealtorreferrals.com/vendor/ichtrojan/laravel-location/src\database\seeds\StatesTableSeeder.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201

    opened by MGParisi 0
  • Composer 2 Compatibility

    Composer 2 Compatibility

    Class Ichtrojan\Location\Seeds\CitiesTableSeeder located in C:/wamp64/www/prorealtorreferrals.com/vendor/ichtrojan/laravel-location/src\database\seeds\CitiesTableSeeder.php does not comply with psr-4 autoloading standard. Skipping. Class Ichtrojan\Location\Seeds\CountriesTableSeeder located in C:/wamp64/www/prorealtorreferrals.com/vendor/ichtrojan/laravel-location/src\database\seeds\CountriesTableSeeder.php does not comply with psr-4 autoloading standard. Skipping. Class Ichtrojan\Location\Seeds\LocationDatabaseSeeder located in C:/wamp64/www/prorealtorreferrals.com/vendor/ichtrojan/laravel-location/src\database\seeds\LocationDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping. Class Ichtrojan\Location\Seeds\StateCityCountrySeeder located in C:/wamp64/www/prorealtorreferrals.com/vendor/ichtrojan/laravel-location/src\database\seeds\StateCityCountrySeeder.php does not comply with psr-4 autoloading standard. Skipping. Class Ichtrojan\Location\Seeds\StatesTableSeeder located in C:/wamp64/www/prorealtorreferrals.com/vendor/ichtrojan/laravel-location/src\database\seeds\StatesTableSeeder.php does not comply with psr-4 autoloading standard. Skipping.

    opened by MGParisi 0
Releases(3.3.0)
Owner
Michael Okoh
The Nothing
Michael Okoh
Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries.

Laravel Countries Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries. Please

Christoph Kempen 695 Dec 30, 2022
oman cities package for laravel app

Seed oman governorates and cities This repo can be used to scaffold Oman Governorates and cities. Installation You can install the package via compose

Gheith Alrawahi 4 Jul 26, 2022
States allows you to create PHP classes following the State Pattern in PHP.

States allows you to create PHP classes following the State Pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability and workflows writing.

Teknoo Software 10 Nov 20, 2022
The list of all Algerian provinces and cities according to the official division in different formats: csv, xlsx, php, json, etc.

algeria-cities This repository contains the list of all the administrative provinces and cities in Algeria. The data is up-to-date according to the of

Ramtani Othmane 393 Jan 2, 2023
Laravel countries and currencies

Countries What does it gives you? This package has all sorts of information about countries: info items taxes 32 geometry maps 248 topology maps 248 c

Antonio Carlos Ribeiro 1.7k Dec 29, 2022
Countries for Laravel

Countries for Laravel What does it gives you? This package has all sorts of information about countries: info items taxes 32 geometry maps 248 topolog

Antonio Carlos Ribeiro 140 Jan 5, 2023
Library for getting countries info from restcountries.com

librestcountries Library for getting countries info from restcountries.com Description Library for getting countries info from restcountries.com Getti

null 4 Sep 18, 2022
Otpify is a Laravel package that provides a simple and elegant way to generate and validate one time passwords.

Laravel Otpify ?? Introduction Otpify is a Laravel package that provides a simple and elegant way to generate and validate one time passwords. Install

Prasanth Jayakumar 2 Sep 2, 2022
Easily add a full Laravel blog (with built in admin panel and public views) to your laravel project with this simple package.

Webdevetc BlogEtc - Complete Laravel Blog Package Quickly add a blog with admin panel to your existing Laravel project. It has everything included (ro

WebDevEtc. 227 Dec 25, 2022
Jetstrap is a lightweight laravel 8 package that focuses on the VIEW side of Jetstream / Breeze package installed in your Laravel application

A Laravel 8 package to easily switch TailwindCSS resources generated by Laravel Jetstream and Breeze to Bootstrap 4.

null 686 Dec 28, 2022
A Laravel chat package. You can use this package to create a chat/messaging Laravel application.

Chat Create a Chat application for your multiple Models Table of Contents Click to expand Introduction Installation Usage Adding the ability to partic

Tinashe Musonza 931 Dec 24, 2022
Laravel SEO - This is a simple and extensible package for improving SEO via meta tags, such as OpenGraph tags.

This is a simple and extensible package for improving SEO via meta tags, such as OpenGraph tags.

ARCHTECH 191 Dec 30, 2022
A simple API documentation package for Laravel using OpenAPI and Stoplight Elements

Laravel Stoplight Elements Easily publish your API documentation using your OpenAPI document in your Laravel Application. Installation You can install

Steve McDougall 24 Nov 17, 2022
A simple package to manage the creation of a structure composed of the service and repository layers in a Laravel application

Chapolim Este projeto tem como objetivo fornecer alguns comandos adicionais à interface de linha de comando do Laravel, o Artisan, para manipular a es

Eliezer Alves 51 Dec 11, 2022
A simple laravel package to validate console commands arguments and options.

Command Validator A simple laravel package to validate console commands arguments and options. Installation Require/Install the package using composer

Touhidur Rahman 20 Jan 20, 2022
A Laravel package that adds a simple image functionality to any Laravel model

Laraimage A Laravel package that adds a simple image functionality to any Laravel model Introduction Laraimage served four use cases when using images

Hussein Feras 52 Jul 17, 2022
GeoLocation-Package - This package helps you to know the current language of the user, the country from which he is browsing, the currency of his country, and also whether he is using it vpn

GeoLocation in PHP (API) ?? ?? ?? This package helps you to know a lot of information about the current user by his ip address ?? ?? ?? This package h

Abdullah Karam 4 Dec 8, 2022
This package provides extended support for our spatie/enum package in Laravel.

Laravel support for spatie/enum This package provides extended support for our spatie/enum package in Laravel. Installation You can install the packag

Spatie 264 Dec 23, 2022
Testbench Component is the de-facto package that has been designed to help you write tests for your Laravel package

Laravel Testing Helper for Packages Development Testbench Component is the de-facto package that has been designed to help you write tests for your La

Orchestra Platform 1.9k Dec 29, 2022