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
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
36 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 [
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider
::
class
,
App\Providers\RouteServiceProvider
::
class
,
App\Providers\DynamicClassProvider
::
class
,
],
...
...
database/seeds/CurrencyUpdates.php
View file @
03da144c
...
...
@@ -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€='
.
$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
...
...
public/css/crypto.css
View file @
03da144c
...
...
@@ -21,5 +21,5 @@ input {
background
:
transparent
;
border
:
1px
;
}
\ No newline at end of file
resources/views/currency.blade.php
View file @
03da144c
@
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
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