Download the PHP package marshmallow/dataset-country without Composer

On this page you can find all versions of the php package marshmallow/dataset-country. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dataset-country

alt text

Marshmallow Dataset Country

This dataset contains all the countries in the world. They are translateable in different languages. It is also possible to get the flag from said countries. The model is extendable so you can extend and overide all functionality if needed.

Installatie

Seed the table

Run php artisan db:seed --class=Marshmallow\\Datasets\\Country\\Seeders\\CountrySeeder to seed the country table.

Nova

Are you using Nova? We have a command for you to generate the Nova Resource. Run php artisan marshmallow:resource Country Datasets\\Country and countries will be available to you in Nova. We hide this resource by default in the Nova navigation. If you wish to have it available in the navigation, add public static $displayInNavigation = true; to app/Nova/Country.php.

Methods

Flags

You can get the flag of a country with $country->flag. If you wish to specify the size of the flag image, you can use $country->flag('16'). The available sizes are 16x16, 24x24, 32x32, 48x48, 64x64 and 128x128. To make use of the flags you will need to publish the flags to your local project by running php artisan vendor:publish --provider="Marshmallow\Datasets\Country\ServiceProvider" --tag=public --force.

Traits

Add the HasCountry trait on your models that have a country. This will set up the relationship and possibly give you extra methods in the future.

Tests during development

php artisan test packages/datasets/country

Translated

Copyright (c) 2020 marshmallow


All versions of dataset-country with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
marshmallow/commands Version ^1.0
marshmallow/sluggable Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package marshmallow/dataset-country contains the following files

Loading the files please wait ....