Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Portugal Cities Laravel Package

renshipt/laravel-portugal-cities

View on GitHub
Deep Wiki
Context7

Laravel 5 Portugal Cities

Laravel Portufal Cities is a bundle for Laravel.

Please note that the dev-master version is for Laravel 5 only

Installation

Run composer require laurentino-dev/laravel-portugal-cities dev-master in your Laravel root directory to install the latest version.

Or add laurentino-dev/laravel-portugal-cities to composer.json.

"laurentino-dev/laravel-portugal-cities": "dev-master"

Run composer update to pull down the latest version of City List.

Edit app/config/app.php and add the provider and filter

'providers' => [
    Laurentinodev\Cities\CitiesServiceProvider::class,
]

Now add the alias.

'aliases' => [
    'Cities' => Laurentinodev\Cities\CitiesFacade::class,
]

Model

You can start by publishing the configuration. This is an optional step, it contains the table name and does not need to be altered. If the default name cities suits you, leave it. Otherwise run the following command

$ php artisan vendor:publish

Next generate the migration file:

$ php artisan cities:migration

It will generate the <timestamp>_setup_cities_table.php migration and the CitiesSeeder.php seeder. To make sure the data is seeded insert the following code in the seeds/DatabaseSeeder.php

//Seed the cities
$this->call('CitiesSeeder');
$this->command->info('Seeded the cities!');

You may now run it with the artisan migrate command:

$ php artisan migrate --seed

After running this command the filled cities table will be available

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor