eliseekn/countries-helper

Helper for countries laravel package

v1.0.0 2021-10-14 17:14 UTC

This package is auto-updated.

Last update: 2024-04-14 22:37:50 UTC


README

Latest Version on Packagist Total Downloads

Helper for countries laravel package

Installation

You can install the package via composer:

composer require eliseekn/countries-helper

Usage

//In your controller
$countries = CountriesHelper::getAll();

//In your blade file
<label for="country" class="form-label">Select country</label>
<select name="country" id="country" class="form-select">
    @foreach($countries as $country)
    @if (!is_null($country))
        @foreach($country as $key => $value)<option value="{{ $key }}">{{ $value }}</option>@endforeach
    @endif
    @endforeach
</select>

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email eliseekn@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.