feat: release SysMVC 2.0 with enhanced CSRF protection and UI improvements

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.
This commit is contained in:
marco
2026-09-04 15:43:17 -03:00
parent 281fdee119
commit 5a2482b030
50 changed files with 1318 additions and 199 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
<div class="container mt-5">
<h1 class="display-4 text-primary">Twig - Create New Crud Example</h1>
<form action="/twigexample/store" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
{{ csrf()|raw }}
<div class="mb-3">
<label for="email" class="form-label">Email:</label>
+1 -1
View File
@@ -6,7 +6,7 @@
<div class="container mt-5">
<h1 class="display-4 text-primary">Twig - Create New Crud Example</h1>
<form action="/twigexample/store" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
{{ csrf()|raw }}
<div class="mb-3">
<label for="email" class="form-label">Email:</label>
+1 -1
View File
@@ -6,7 +6,7 @@
<div class="container mt-5">
<h1 class="display-4 text-primary">Twig - Edit Crud Example</h1>
<form action="/twigexample/update/{{ twigexample.id }}" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
{{ csrf()|raw }}
<div class="mb-3">
<label for="name" class="form-label">Name:</label>
+1 -1
View File
@@ -6,7 +6,7 @@
<div class="container mt-5">
<h1 class="display-4 text-primary">Twig - Edit Crud Example</h1>
<form action="/twigexample/update/{{ twigexample.id }}" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
{{ csrf()|raw }}
<div class="mb-3">
<label for="name" class="form-label">Name:</label>
+8 -8
View File
@@ -25,14 +25,14 @@
<td>{{ item.name }}</td>
<td>{{ item.company }}</td>
<td>
<a href="/twigexample/show/{{ item.id }}" class="btn btn-info btn-sm me-2">View</a>
<a href="/twigexample/edit/{{ item.id }}" class="btn btn-warning btn-sm me-2">Edit</a>
<!-- Delete form -->
<form action="/twigexample/delete/{{ item.id }}" method="POST" style="display:inline;">
<input type="hidden" name="_method" value="POST">
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')">Delete</button>
</form>
<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 %}
+8 -8
View File
@@ -25,14 +25,14 @@
<td>{{ item.name }}</td>
<td>{{ item.company }}</td>
<td>
<a href="/twigexample/show/{{ item.id }}" class="btn btn-info btn-sm me-2">View</a>
<a href="/twigexample/edit/{{ item.id }}" class="btn btn-warning btn-sm me-2">Edit</a>
<!-- Delete form -->
<form action="/twigexample/delete/{{ item.id }}" method="POST" style="display:inline;">
<input type="hidden" name="_method" value="POST">
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')">Delete</button>
</form>
<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 %}
+2 -1
View File
@@ -36,7 +36,8 @@
</tr>
</table>
<a href="/twigexample/edit/{{ twigexample.id }}" class="btn btn-warning me-2">Edit</a>
<form action="/twigexample/delete/{{ twigexample.id }}" method="POST" style="display:inline;">
<form action="/twigexample/delete/{{ twigexample.id }}" method="POST" class="d-inline">
{{ csrf() }}
<button type="submit" class="btn btn-danger me-2" onclick="return confirm('Are you sure?')">Delete</button>
</form>
<a href="/twigexample" class="btn btn-secondary">Back to List</a>
+4 -3
View File
@@ -35,9 +35,10 @@
<td>{{ twigexample.notes }}</td>
</tr>
</table>
<a href="/twigexample/edit/{{ twigexample.id }}" class="btn btn-warning me-2">Edit</a>
<form action="/twigexample/delete/{{ twigexample.id }}" method="POST" style="display:inline;">
<button type="submit" class="btn btn-danger me-2" onclick="return confirm('Are you sure?')">Delete</button>
<a href="/twigexample/edit/{{ twigexample.id }}" class="btn btn-warning mr-2">Edit</a>
<form action="/twigexample/delete/{{ twigexample.id }}" method="POST" class="d-inline">
{{ csrf()|raw }}
<button type="submit" class="btn btn-danger mr-2" onclick="return confirm('Are you sure?')">Delete</button>
</form>
<a href="/twigexample" class="btn btn-secondary">Back to List</a>
</div>