Skip to content

Instantly share code, notes, and snippets.

@Rokt33r
Created March 29, 2014 17:14
Show Gist options
  • Save Rokt33r/9858287 to your computer and use it in GitHub Desktop.
Save Rokt33r/9858287 to your computer and use it in GitHub Desktop.
Laravel 基礎 Lesson 4 - DB (app/views/posts/index.php)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h1>Posts list <a href="./posts/create">create a new post</a></h1>
<ul>
<?php foreach($posts as $post){ ?>
<h2><a href="./posts/<?php echo $post->id?>">
<?php echo $post->title ?></a></h2>
<p><?php echo $post->body ?></p>
<?php } ?>
</ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment