Major version upgrade from 1.0.0 to 2.0.0 including copyright year updates, website URL migration to syspanel.com.br, and comprehensive CSRF token handling improvements. The Twig csrf() helper now returns a complete hidden input field instead of a raw token value, and token generation is now automatic when empty. Session initialization has been centralized in BaseController, and child controllers now properly call parent constructors. CRUD views have been modernized with flexbox layouts and consistent CSRF rendering. Documentation has been expanded with features, requirements, and project structure sections, and donation sections have been added across all pages.
44 lines
1.8 KiB
Twig
Executable File
44 lines
1.8 KiB
Twig
Executable File
{% extends 'layout.twig.php' %}
|
|
|
|
{% block title %}Crud Example List{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container mt-5">
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h1 class="display-4 text-primary">Twig - Crud Example List</h1>
|
|
<a href="/twigexample/create" class="btn btn-success btn-lg">Add New Item</a>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-hover">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
<th>Company</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in twigexample %}
|
|
<tr>
|
|
<td>{{ item.id }}</td>
|
|
<td>{{ item.name }}</td>
|
|
<td>{{ item.company }}</td>
|
|
<td>
|
|
<div class="d-flex">
|
|
<a href="/twigexample/show/{{ item.id }}" class="btn btn-info btn-sm mr-1">View</a>
|
|
<a href="/twigexample/edit/{{ item.id }}" class="btn btn-warning btn-sm mr-1">Edit</a>
|
|
<form action="/twigexample/delete/{{ item.id }}" method="POST" class="d-inline">
|
|
{{ csrf()|raw }}
|
|
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')">Delete</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|