view
This commit is contained in:
parent
cb9118d24f
commit
a6ff5feb3e
11
source/design/controller/Base.php
Normal file
11
source/design/controller/Base.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Portfolio\Source\Design\Controller;
|
||||
|
||||
class Base
|
||||
{
|
||||
public function show(string $path, array $params = null)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -2,12 +2,12 @@
|
||||
|
||||
namespace Portfolio\source\design\controller\home;
|
||||
|
||||
class Index
|
||||
use Portfolio\Source\Design\Controller\Base;
|
||||
|
||||
class Index extends Base
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
|
||||
echo 'function index';
|
||||
// return $this->show('home.index');
|
||||
return $this->show('home.index');
|
||||
}
|
||||
}
|
@ -2,12 +2,12 @@
|
||||
|
||||
namespace Portfolio\Source\Design\Controller\Home\Read;
|
||||
|
||||
class Read
|
||||
use Portfolio\Source\Design\Controller\Base;
|
||||
|
||||
class Read extends Base
|
||||
{
|
||||
public function read(int $id)
|
||||
{
|
||||
echo 'post' . $id;
|
||||
|
||||
// return $this->show('home.read', compact(['id']));
|
||||
return $this->show('home.read', compact(['id']));
|
||||
}
|
||||
}
|
25
template/base.html
Normal file
25
template/base.html
Normal file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
|
||||
</header>
|
||||
|
||||
<aside>
|
||||
|
||||
</aside>
|
||||
|
||||
<main>
|
||||
{{ content }}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
1
template/home/read/read.html
Normal file
1
template/home/read/read.html
Normal file
@ -0,0 +1 @@
|
||||
<p>content</p>
|
Loading…
x
Reference in New Issue
Block a user