52 lines
1.7 KiB
Plaintext
Executable File
52 lines
1.7 KiB
Plaintext
Executable File
<?php $_shouldextend[1]=1; ?>
|
|
|
|
<?php $this->startSection('title', 'Crud Example Create'); ?>
|
|
|
|
<?php $this->startSection('content'); ?>
|
|
<div class="container mt-5">
|
|
<h1 class="text-success">Blade - Crud Example New Item</h1>
|
|
|
|
<!-- Display error message if any -->
|
|
<?php if($error): ?>
|
|
<div class="alert alert-danger">
|
|
<?php echo \htmlentities($error??'', ENT_QUOTES, 'UTF-8', false); ?>
|
|
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<form action="/crudexample" method="POST">
|
|
<?= csrf() ?>
|
|
<div class="mb-3">
|
|
<label for="name" class="form-label">Name:</label>
|
|
<input type="text" id="name" name="name" class="form-control" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="password" class="form-label">Password:</label>
|
|
<input type="password" id="password" name="password" class="form-control" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="company" class="form-label">Company:</label>
|
|
<input type="text" id="company" name="company" class="form-control">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="address" class="form-label">Address:</label>
|
|
<input type="text" id="address" name="address" class="form-control">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="phone" class="form-label">Phone:</label>
|
|
<input type="text" id="phone" name="phone" class="form-control">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="email" class="form-label">Email:</label>
|
|
<input type="email" id="email" name="email" class="form-control" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="notes" class="form-label">Notes:</label>
|
|
<textarea id="notes" name="notes" class="form-control"></textarea>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Create</button>
|
|
</form>
|
|
</div>
|
|
<?php $this->stopSection(); ?>
|
|
|
|
<?php if (isset($_shouldextend[1])) { echo $this->runChild('layout'); } ?> |