Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //form.html.twig
- <form method="post" action="{{ path("createBook")}}">
- <input type="text" name="title" placeholder="title">
- <input type="text" name="description" placeholder="description">
- <input type="number" name="rating" placeholder="rating">
- <input type="submit">
- </form>
- //showAllBooks.html.twig
- {% for item in allBooks %}
- <div>
- <a href="{{ path('showBook', {'id':item.id}) }}">
- {{ item.title }}
- </a>
- <a href="{{ path('removeBook', {'id':item.id}) }}">
- Usuń
- </a>
- </div>
- {% endfor %}
- //showBook.html.twig<div>
- {{ book.id }}<br>
- {{ book.title }}<br>
- {{ book.description }}<br>
- </div>
Add Comment
Please, Sign In to add comment