Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>@yield('title')</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/css/app.css">
</head>
@if (count($errors) > 0)
<!-- Form Error List -->
<div class="alert alert-danger">
<div><strong>エラー</strong></div>
<div>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
@extends('layouts.application')
@section('title', '問題マスタ')
@section('script')
<script>
$(function() {
$(".btn-dell").click(function() {
if (confirm("本当に削除しますか?")) {
} else {
return false;
<?php
namespace App\Http\Controllers;
use App\Models\problem;
use Illuminate\Http\Request;
use Models;
class ProblemController extends Controller
{
<?php
use App\Models\problem;
Route::get('/', function () {
return view('welcome');
});
Route::group(['prefix' => 'problem'], function () {
//一覧
@extends('layouts.application')
@section('title', '新規作成')
@section('content')
<br><br>
<form action="" method="post" class="form-horizontal">
@csrf
{{ method_field('patch') }}
@include('layouts.errors')
<div class="form-group">
@extends('layouts.application')
@section('title', '新規作成確認')
@section('content')
<br><br>
<form action="" method="post" class="form-horizontal">
@csrf
<input type="hidden" name="problemId" value="{{$problemId}}">
<input type="hidden" name="problemCategory" value="{{$problemCategory}}">
<input type="hidden" name="problemTitle" value="{{$problemTitle}}">
@extends('layouts.application')
@section('title', '更新')
@section('content')
<br><br>
<form action="" method="post" class="form-horizontal">
@csrf
{{ method_field('patch') }}
@include('layouts.errors')
<div class="row">