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 [
...
@@ -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
...
@@ -21,5 +21,5 @@ input {
...
@@ -21,5 +21,5 @@ input {
background
:
transparent
;
background
:
transparent
;
border
:
1px
;
border
:
1px
;
}
}
\ No newline at end of file
resources/views/currency.blade.php
View file @
03da144c
@
extends
(
'header'
)
@
extends
(
'header'
)
@
section
(
'content'
)
@
section
(
'content'
)
<
div
class
="
card
">
<
div
class
="
card
">
<div class="
card
-
body
">
<div class="
card
-
body
">
<label for="
FormControlSelect1
">Convert From</label>
<label for="
FormControlSelect1
">Convert From</label>
<div class="
input
-
group
">
<div class="
input
-
group
">
<br>
<br>
<select class="
form
-
control
" id="
FormControlSelect1
">
<form>
<option>USD</option>
<select class="
form
-
control
" id="
FormControlSelect1
">
<option>ETH</option>
@foreach (
$currencies
as
$item
)
<option>XRP</option>
<option class="
color
" value="
{{
$item
->
ID
}}
">{{
$item->name
}} - {{
$item->iso
}}</option>
<option>ADA</option>
@endforeach
<option>LTC</option>
</select>
<option>DASH</option>
<option>USDT</option>
<input type="
number
" class="
form
-
control
form
-
control
-
lg
mx
-
3
" value="">
</select>
<br> <br>
</div>
<select class="
form
-
control
" id="
FormControlSelect1
">
<input type="
number
" class="
form
-
control
form
-
control
-
lg
mx
-
3
" value="">
@foreach (
$currencies
as
$item
)
<label for="
FormControlSelect1
">To</label>
<option class="
color
" value="
{{
$item
->
ID
}}
">{{
$item->name
}} - {{
$item->iso
}}</option>
<div class="
input
-
group
">
@endforeach
<br> <br>
</select>
<select class="
form
-
control
" id="
FormControlSelect1
">
<input type="
number
" class="
form
-
control
form
-
control
-
lg
mx
-
3
" value="">
<option>BTC</option>
<br> <br>
<option>ETH</option>
<button class="
btn
btn
--
pill
" type="
submit
">Convert!</button>
<option>XRP</option>
</form>
<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>
</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