Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KELBERT Paul
ApplicationsBD_CHEVALIER_TONDON_KELBERT
Commits
e2c79107
Commit
e2c79107
authored
Mar 25, 2020
by
KELBERT Paul
Browse files
partie 2
parent
5c290c5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Seance5-6/seance/src/controller/IndexController.php
View file @
e2c79107
...
...
@@ -20,26 +20,10 @@ class IndexController
$game
=
Game
::
select
(
'id'
,
'name'
,
'alias'
,
'deck'
)
->
where
(
'id'
,
'<='
,
'200'
)
->
get
();
// $game = Game::where('id','=',1)->get();
// $json = json_encode($game,JSON_FORCE_OBJECT);
$json
=
'{ "games" : [ '
;
foreach
(
$game
as
$key
=>
$value
)
{
$json
=
$json
.
json_encode
(
$value
)
.
','
;
/*$json = $json . '{
"id": ' . $value->id . ',
"name":' . $value->name . ',
"deck":' . $value->deck . ',
},
';*/
if
(
$value
->
id
==
200
)
{
$json
=
$json
.
json_encode
(
$value
);
/*
$json = $json . '{
"id": ' . $value->id . ',
"name":' . $value->name . ',
"deck":' . $value->deck . ',
}
';*/
}
}
$json
=
$json
.
']}'
;
$value
->
description
=
"..."
;
}
$json
=
json_encode
(
$game
);
$cq2
=
new
VuePartie2
(
$json
);
$cq2
->
render
();
}
...
...
Seance5-6/seance/src/view/VuePartie2.php
View file @
e2c79107
...
...
@@ -21,12 +21,11 @@ class VuePartie2
<
link
rel
=
"stylesheet"
href
=
"css/main.css"
>
<
title
>
photobox
</
title
>
<
title
>
AppliBD
</
title
>
</
head
>
<
body
>
<
h1
>
Titre
</
h1
>
<
p
>
$json
</
p
>
$json
</
body
>
END
;
...
...
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