Commit 03da144c by Florian Shllaku

pushing changes

parent b7db6c72
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class CurrencyListing extends Model
{
protected $table = 'currency';
}
<?php
namespace App\Providers;
use App\CurrencyListing;
use Illuminate\Support\ServiceProvider;
class DynamicClassProvider extends ServiceProvider
{
public function boot()
{
view()->composer('*', function($view){
$view->with('currencies', CurrencyListing::all());
});
}
}
\ No newline at end of file
......@@ -174,6 +174,7 @@ return [
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Providers\DynamicClassProvider::class,
],
......
......@@ -28,7 +28,7 @@ class CurrencyUpdates extends Seeder
if(preg_match("/rate='([[:graph:]]+)'/",$line,$rate)){
//Output the value of 1EUR for a currency code
echo'1&euro;='.$rate[1].' '.$currencyCode[1].'<br/>';
$list = array("US dollar", "Japanese yen", "Bulgarian lev", "Czech koruna", "Danish krone", "Pound sterling","Hungarian forint", "Polish zloty", "Romanian leu", "Swedish krona", "Swiss franc", "Icelandic krona", "Norwegian krone", "Croatian kuna", "Russian rouble", "Turkish lira", "Australian dollar", "Brazilian real", "US dollar", "Canadian dollar", "Chinese yuan renminbi", "Hong Kong dollar", "Indonesian rupiah", "Israeli shekel", "Indian rupee", "South Korean won", "Mexican peso", "Malaysian ringgit", "New Zealand dollar", "Philippine peso", "Singapore dollar", "Thai baht", "South African rand");
$list = array("US dollar", "Japanese yen", "Bulgarian lev", "Czech koruna", "Danish krone", "Pound sterling","Hungarian forint", "Polish zloty", "Romanian leu", "Swedish krona", "Swiss franc", "Icelandic krona", "Norwegian krone", "Croatian kuna", "Russian rouble", "Turkish lira", "Australian dollar", "Brazilian real", "Canadian dollar", "Chinese yuan renminbi", "Hong Kong dollar", "Indonesian rupiah", "Israeli shekel", "Indian rupee", "South Korean won", "Mexican peso", "Malaysian ringgit", "New Zealand dollar", "Philippine peso", "Singapore dollar", "Thai baht", "South African rand");
//--------------------------------------------------
//Here you can add your code for inserting
......
......@@ -21,5 +21,5 @@ input {
background: transparent;
border: 1px;
}
\ No newline at end of file
@extends('header')
@section('content')
<div class="card">
<div class="card-body">
<label for="FormControlSelect1">Convert From</label>
<div class="input-group">
<br>
<select class="form-control" id="FormControlSelect1">
<option>USD</option>
<option>ETH</option>
<option>XRP</option>
<option>ADA</option>
<option>LTC</option>
<option>DASH</option>
<option>USDT</option>
</select>
</div>
<input type="number" class="form-control form-control-lg mx-3" value="">
<label for="FormControlSelect1">To</label>
<div class="input-group">
<br> <br>
<select class="form-control" id="FormControlSelect1">
<option>BTC</option>
<option>ETH</option>
<option>XRP</option>
<option>ADA</option>
<option>LTC</option>
<option>DASH</option>
<option>USDT</option>
</select>
</div>
<input type="number" class="form-control form-control-lg mx-3" value="">
<br> <br>
<div class="btn">
<button class="btn btn--pill" type="submit">Convert!</button>
</div>
<div class="card">
<div class="card-body">
<label for="FormControlSelect1">Convert From</label>
<div class="input-group">
<br>
<form>
<select class="form-control" id="FormControlSelect1">
@foreach ($currencies as $item)
<option class="color" value="{{ $item->ID }}">{{ $item->name }} - {{ $item->iso }}</option>
@endforeach
</select>
<input type="number" class="form-control form-control-lg mx-3" value="">
<br> <br>
<select class="form-control" id="FormControlSelect1">
@foreach ($currencies as $item)
<option class="color" value="{{ $item->ID }}">{{ $item->name }} - {{ $item->iso }}</option>
@endforeach
</select>
<input type="number" class="form-control form-control-lg mx-3" value="">
<br> <br>
<button class="btn btn--pill" type="submit">Convert!</button>
</form>
</div>
</div>
</div>
<script>
</script>
@include('footer')
@endsection
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment