PHP code example of pardalsalcap / linter-locations

1. Go to this page and download the library: Download pardalsalcap/linter-locations 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/ */

    

pardalsalcap / linter-locations example snippets


return [
    'available_locales' => [
        'ca' => 'Català',
        'es' => 'Castellano',
        'en' => 'English',
    ],
    'use_scoped_search' => true,
];



namespace App\Filament\Resources;

class ContinentResource extends \Pardalsalcap\LinterLocations\Resources\ContinentResource
{
}

use Illuminate\Database\Eloquent\Model;
use Pardalsalcap\LinterLocations\Traits\HasAddresses;

class User extends Model
{
    use HasAddresses;
}



namespace App\Filament\Resources;

use Filament\Resources\Resource;
use Pardalsalcap\LinterLocations\Resources\AddressResource\RelationManagers\AddressableRelationManager;

class UserResource extends Resource
{
    public static function getRelations(): array
    {
        return [
            AddressableRelationManager::class,
        ];
    }
}
bash
php artisan vendor:publish --tag="linter-locations-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="linter-locations-config"
bash
php artisan linter-locations:install
bash
php artisan vendor:publish --tag="linter-locations-translations"