1. Go to this page and download the library: Download artesaos/cidadesbr library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
artesaos / cidadesbr example snippets
// file START ommited
'providers' => [
// other providers ommited
'Artesaos\Providers\CidadesServiceProvider',
],
// file END ommited
namespace Artesaos;
use Illuminate\Database\Eloquent\Model;
class Cidade extends Model{
public $timestamps = false;
protected $fillable = ['nome', 'uf'];
}