Countries helper
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 [email protected] 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.