/twill-capsule-countries

A Twill Capsule to manage Countries

Primary LanguagePHPMIT LicenseMIT

Countries Capsule

A Twill Capsule to help you manage a list of Countries

screenshot

Description

This is a simple and translatable list of countries.

Please make sure your users have the proper permissions to edit/unpublish the homepage.

Installing

You can clone, copy the zip or do it via

php artisan twill:capsule:install countries

Enable the Capsule adding it to config/twill.php

return [
    'destinations' => [
        'title' => 'Destinations',

        'route' => 'admin.destinations.countries.index',

        'primary_navigation' => [
            'countries' => [
                'title' => 'Countries',
                'module' => true,
            ],

            'cities' => [
                'title' => 'Cities',
                'module' => true,
            ],
        ],
    ],
];

Navigation

Add this to twill-navigation.php to make your homepage link go directly to the edit page:

return [
    'countries' => [
        'title' => 'Countries',

        'module' => true,
    ],
];

Seeder

This Capsule contains a seeder to seed countries and countries, to use use it, you just need to call on your databaase/seeders/DatabaseSeeder.php:

<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Twill\Capsules\Countries\Database\Seeds\DatabaseSeeder as CountriesDatabaseSeeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     *
     * @return void
     */
    public function run()
    {
        app(CountriesDatabaseSeeder::class)->run();
    }
}

It depends on Countries and ForceUTF8 packages that can be installed using:

composer require pragmarx/countries
composer require neitanod/forceutf8

Dependencies