Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
abalsh
/
Garlix
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
03da144c
authored
Apr 30, 2019
by
Florian Shllaku
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pushing changes
parent
b7db6c72
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
20 deletions
app/CurrencyListing.php
app/Providers/DynamicClassProvider.php
config/app.php
database/seeds/CurrencyUpdates.php
public/css/crypto.css
resources/views/currency.blade.php
app/CurrencyListing.php
0 → 100644
View file @
03da144c
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
CurrencyListing
extends
Model
{
protected
$table
=
'currency'
;
}
app/Providers/DynamicClassProvider.php
0 → 100644
View file @
03da144c
<?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
config/app.php
View file @
03da144c
...
@@ -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
,
],
],
...
...
database/seeds/CurrencyUpdates.php
View file @
03da144c
...
@@ -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€='
.
$rate
[
1
]
.
' '
.
$currencyCode
[
1
]
.
'<br/>'
;
echo
'1€='
.
$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
...
...
public/css/crypto.css
View file @
03da144c
resources/views/currency.blade.php
View file @
03da144c
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment