Skip to content

Instantly share code, notes, and snippets.

@soipo
soipo / country_lists.dart
Last active May 27, 2019
Flutter Country list utility
View country_lists.dart
class CountryList{
static final Map<String,String> countries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
@soipo
soipo / country_lists.dart
Created May 27, 2019
Flutter Country list utility
View country_lists.dart
class CountryList{
static final Map<String,String> countries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
View Offer.php
<?php
namespace App\Nova;
use App\Nova\Store\StoreIcon;
use App\Nova\Store\StoreImage;
use Laravel\Nova\Fields\ID;
use Illuminate\Http\Request;
use Laravel\Nova\Http\Requests\NovaRequest;
use MrMonat\Translatable\Translatable;
View Offer.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage;
use Spatie\Translatable\HasTranslations;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
@soipo
soipo / Locale.php
Last active Mar 15, 2019
Laravel 5 session locale and api middleware
View Locale.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Session\Session;
use Illuminate\Http\Request;
class Locale {