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 [ ...@@ -174,6 +174,7 @@ return [
// App\Providers\BroadcastServiceProvider::class, // App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class, App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class, App\Providers\RouteServiceProvider::class,
App\Providers\DynamicClassProvider::class,
], ],
......
...@@ -28,7 +28,7 @@ class CurrencyUpdates extends Seeder ...@@ -28,7 +28,7 @@ class CurrencyUpdates extends Seeder
if(preg_match("/rate='([[:graph:]]+)'/",$line,$rate)){ if(preg_match("/rate='([[:graph:]]+)'/",$line,$rate)){
//Output the value of 1EUR for a currency code //Output the value of 1EUR for a currency code
echo'1&euro;='.$rate[1].' '.$currencyCode[1].'<br/>'; 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 //Here you can add your code for inserting
......
...@@ -6,36 +6,31 @@ ...@@ -6,36 +6,31 @@
<label for="FormControlSelect1">Convert From</label> <label for="FormControlSelect1">Convert From</label>
<div class="input-group"> <div class="input-group">
<br> <br>
<form>
<select class="form-control" id="FormControlSelect1"> <select class="form-control" id="FormControlSelect1">
<option>USD</option> @foreach ($currencies as $item)
<option>ETH</option> <option class="color" value="{{ $item->ID }}">{{ $item->name }} - {{ $item->iso }}</option>
<option>XRP</option> @endforeach
<option>ADA</option>
<option>LTC</option>
<option>DASH</option>
<option>USDT</option>
</select> </select>
</div>
<input type="number" class="form-control form-control-lg mx-3" value=""> <input type="number" class="form-control form-control-lg mx-3" value="">
<label for="FormControlSelect1">To</label>
<div class="input-group">
<br> <br> <br> <br>
<select class="form-control" id="FormControlSelect1"> <select class="form-control" id="FormControlSelect1">
<option>BTC</option> @foreach ($currencies as $item)
<option>ETH</option> <option class="color" value="{{ $item->ID }}">{{ $item->name }} - {{ $item->iso }}</option>
<option>XRP</option> @endforeach
<option>ADA</option>
<option>LTC</option>
<option>DASH</option>
<option>USDT</option>
</select> </select>
</div>
<input type="number" class="form-control form-control-lg mx-3" value=""> <input type="number" class="form-control form-control-lg mx-3" value="">
<br> <br> <br> <br>
<div class="btn">
<button class="btn btn--pill" type="submit">Convert!</button> <button class="btn btn--pill" type="submit">Convert!</button>
</form>
</div> </div>
</div> </div>
</div> </div>
<script>
</script>
@include('footer') @include('footer')
@endsection @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