Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/area17/twill-capsule-cities
A Twill Capsule to manage Cities
https://github.com/area17/twill-capsule-cities
Last synced: about 1 month ago
JSON representation
A Twill Capsule to manage Cities
- Host: GitHub
- URL: https://github.com/area17/twill-capsule-cities
- Owner: area17
- License: mit
- Created: 2021-05-24T23:12:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-04T10:41:17.000Z (over 3 years ago)
- Last Synced: 2024-08-03T17:12:35.683Z (5 months ago)
- Language: PHP
- Size: 397 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-twill - Cities Capsule - A Twill Capsule to help you manage a list of Cities (Packages)
README
# Cities Capsule
### A [Twill Capsule](https://github.com/area17/twill) to help you manage a list of Cities
![screenshot](docs/screenshot-1.png)
![screenshot](docs/screenshot-2.png)
### Description
This is a simple and translatable list of cities.
**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 cities
```Enable the Capsule adding it to `config/twill.php`
```php
return [
'capsules' => [
'list' => [
[
'name' => 'Cities',
'enabled' => true,
],
...
],
],
```## Navigation
Add this to `twill-navigation.php` to make your homepage link go directly to the edit page:
```php
return [
'destinations' => [
'title' => 'Destinations','route' => 'admin.destinations.countries.index',
'primary_navigation' => [
'countries' => [
'title' => 'Countries',
'module' => true,
],'cities' => [
'title' => 'Cities',
'module' => true,
],
],
],
];
```## Seeder
This Capsule contains a seeder to seed cities and countries, to use use it, you just need to call on your `databaase/seeders/DatabaseSeeder.php`:
```php
run();
}
}
```It depends on [Countries](https://packagist.org/packages/pragmarx/countries) and [ForceUTF8](https://github.com/neitanod/forceutf8) packages that can be installed using:
```bash
composer require pragmarx/countries
composer require neitanod/forceutf8
```## Dependencies
- Depends on the [Twill Capsules Base](https://github.com/area17/twill-capsule-base) repository.
- Depends on the [Twill Capsules Countries](https://github.com/area17/twill-capsule-countries) repository.