ffsantos92/
laracountries
g4t.io

Country Migrations and Seeds for Laravel

20 views by Eric L. Barnes

Fábio Santos created a complete list of country migrations and seeders for Laravel. This is handy when you need them in the database but sometimes all you need…

README from ffsantos92/laracountries Open on GitHub →

Laracountries

Migration and seed files with all countries for Laravel PHP Framework.

The country codes are in the format ISO 3166-1 alpha-2.

A Simple Example of Use (Laravel 5)

Model

<?php

use Illuminate\Database\Eloquent\Model;

class Country extends Model
{
    protected $table = 'countries';
    public $timestamps = false;
}

Controller

/**
 * Show the form for creating a new resource.
 *
 * @return View
 */
public function create()
{
    $countries = Country::all();

    return view('myview', compact('countries'));
}

View

<select class="form-control" name="country">
    <option value="">Select a country</option>
    @foreach($countries as $country)
        <option value="{{ $country->id }}">{{ $country->name }}</option>
    @endforeach
</select>

License

See the LICENSE file for license rights and limitations (MIT).

More from the ecosystem

durable-workflow/
workflow
g4t.io
9 1,292

Durable Workflow: Long-Running Workflows for Laravel

Embedded durable workflow runtime and orchestration engine for Laravel applications.

durable-workflow/workflow via Laravel News
packstub/
session-replay
g4t.io
14 52

Session Replay for Laravel: Self-Hosted Browser Recordings

Session replay for Laravel: record what a person did in the browser with rrweb, keep the recording on your own disk and database, and watch it behind a gate you define — masked inputs by default, errors, failed Livewire requests and web vitals marked on the timeline, a link to the replay in every log line. packstub/filament-session-replay adds the sessions to a Filament panel.

packstub/session-replay via Laravel News
cyberwizard-dev/
schedule-catchup
g4t.io
17

Replay Missed Laravel Scheduled Tasks With Schedule Catchup

Schedule Catchup replays missed Laravel scheduled tasks after downtime, with opt-in recovery, bounded retries, and access to the original scheduled date.

cyberwizard-dev/schedule-catchup via Laravel News