initial commit
This commit is contained in:
commit
3f64f4a49a
221 files changed
+26665
No files matched your search
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Форма: {{title}}. Одна на создание и на правку.
|
||||
*
|
||||
* @var \App\Models\{{class}} $record
|
||||
*/
|
||||
|
||||
use Rsgrinko\Proton\View\View;
|
||||
|
||||
$isNew = !$record->existsInDatabase();
|
||||
$action = $isNew
|
||||
? View::route('{{route}}.create')
|
||||
: View::route('{{route}}.edit', ['id' => $record->id()]);
|
||||
?>
|
||||
<h1><?= $isNew ? 'Новая запись' : 'Правка записи' ?></h1>
|
||||
|
||||
<div class="card">
|
||||
<form method="post" action="<?= View::e($action) ?>">
|
||||
<?= View::csrf() ?>
|
||||
|
||||
{{form}}
|
||||
|
||||
<div class="row">
|
||||
<button type="submit" class="primary">Сохранить</button>
|
||||
<a class="btn" href="<?= View::e(View::route('{{route}}.index')) ?>">Отмена</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
Reference in new issue
Block a user