krgm.so-manager-dev.com/resources/views/admin/news/add.blade.php
ou.zaikou e1629913bd 初回コミット
Signed-off-by:  ou.zaikou<caihaoweng@gmail.com>
2025-08-21 23:09:40 +09:00

74 lines
2.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.app')
@section('title', 'ニュース新規作成')
@section('content')
{{-- コンテンツヘッダー(パンくず) --}}
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-lg-6"><h1 class="m-0 text-dark">ニュース新規作成</h1></div>
<div class="col-lg-6">
<ol class="breadcrumb float-sm-right text-sm">
<li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
<li class="breadcrumb-item"><a href="{{ route('news') }}">最新ニュース登録</a></li>
<li class="breadcrumb-item active">新規作成</li>
</ol>
</div>
</div>
</div>
</div>
<section class="content">
<div class="container-fluid">
{{-- バリデーションエラー表示 --}}
@if ($errors->any())
<div class="alert alert-danger"><ul class="mb-0">@foreach($errors->all() as $e)<li>{{ $e }}</li>@endforeach</ul></div>
@endif
{{-- 入力フォーム --}}
<div class="card">
<div class="card-body">
<form method="post" action="{{ route('news_add') }}">
@csrf
<div class="form-group">
<label>ニュース内容 <span class="text-danger">*</span></label>
<textarea name="news" class="form-control" rows="8" required>{{ old('news') }}</textarea>
</div>
<div class="form-group">
<label>公開日時2025-08-13 09:00:00</label>
<input type="text" name="open_datetime" class="form-control" placeholder="YYYY-MM-DD HH:MM:SS" value="{{ old('open_datetime') }}">
</div>
<div class="form-group">
<label>リンクURL</label>
<input type="text" name="link_url" class="form-control" value="{{ old('link_url') }}">
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label>画像1URL</label>
<input type="text" name="image1_filename" class="form-control" value="{{ old('image1_filename') }}">
</div>
<div class="form-group col-md-6">
<label>画像2URL</label>
<input type="text" name="image2_filename" class="form-control" value="{{ old('image2_filename') }}">
</div>
</div>
<div class="form-group">
<label>表示モード <span class="text-danger">*</span></label>
<select name="mode" class="form-control" required>
<option value="1" @selected(old('mode','1')=='1')>公開</option>
<option value="2" @selected(old('mode')=='2')>下書き</option>
<option value="0" @selected(old('mode')=='0')>非表示</option>
</select>
</div>
<div class="text-right">
<a href="{{ route('news') }}" class="btn btn-outline-secondary">戻る</a>
<button class="btn btn-primary">登録</button>
</div>
</form>
</div>
</div>
</div>
</section>
@endsection