Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 32b7fe7

Browse files
Vista jumbotron y call to action
1 parent 3e6ef87 commit 32b7fe7

File tree

2 files changed

+8
-21
lines changed

2 files changed

+8
-21
lines changed

‎app/controllers/Home/HomeController.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ class HomeController extends Controller
1010
*/
1111
public $nombre;
1212

13-
/**
14-
* array
15-
*/
16-
public $lenguajes_favoritos;
17-
1813
/**
1914
* object
2015
*/
@@ -27,7 +22,6 @@ public function __construct()
2722
{
2823
$this->model = new HomeModel();
2924
$this->nombre = 'Mundo';
30-
$this->lenguajes_favoritos = array('Javascript', 'Php');
3125
}
3226

3327
/**
@@ -39,11 +33,11 @@ public function exec()
3933
}
4034

4135
/**
42-
* Método de ejemplo con parámetro
36+
* Método de ejemplo
4337
*/
4438
public function show()
4539
{
46-
$params = array('nombre' => $this->nombre, 'lenguajes' => $this->lenguajes_favoritos);
40+
$params = array('nombre' => $this->nombre);
4741
$this->render(__CLASS__, $params);
4842
}
4943

‎app/views/Home/Home.php

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,12 @@
55
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
66
</head>
77
<body>
8-
<div class="container">
9-
<div class="jumbotron">
10-
<h1>Hola <?php echo $nombre; ?></h1>
11-
</div>
12-
<div>
13-
<ul>
14-
<?php
15-
foreach($lenguajes as $lenguaje)
16-
{
17-
echo "<li>$lenguaje</li>";
18-
}
19-
?>
20-
</ul>
8+
<!-- Main jumbotron for a primary marketing message or call to action -->
9+
<div class="jumbotron">
10+
<div class="container text-center">
11+
<h1>Hola, <?= $nombre ?>!</h1>
12+
<p>Este es un ejemplo de MVC con Php vanilla hecho desde cero.</p>
13+
<p><a class="btn btn-primary btn-lg" target="_blank" href="https://github.com/Developero-oficial/php-mvc" role="button">Código fuente &raquo;</a></p>
2114
</div>
2215
</div>
2316
</body>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /