project-management/resources/views/note/edit.blade.php
2022-05-08 01:40:25 +08:00

44 lines
1.7 KiB
PHP

<?php
/** @var \App\Models\Note $note */
?>
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-6">
<form
action="{{ $note->id ? route('adm.note.update', [$note->id]) : route('adm.note.store') }}"
method="post">
@csrf
@if($note->id)
@method('PUT')
<div class="row mb-3">
<div class="col">
<h1>編輯 Note: {{ $note->project->title }} {{ $note->project->id }}</h1>
</div>
</div>
@else
<div class="row mb-3">
<div class="col">
<h1>新增 Note: {{ $project->title }}</h1>
<input type="hidden" name="project_id" value="{{ $project->id }}">
</div>
</div>
@endif
<x-success-alert></x-success-alert>
<x-validation-alert></x-validation-alert>
<x-model-form-control-group :model="$note" attr="content" type="text_area" label="內容" :required="true"></x-model-form-control-group>
<button type="submit" class="btn btn-success">
@if($note->id)
Update
@else
Create
@endif
</button>
</form>
</div>
</div>
</div>
@endsection