This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Traits; | |
use Illuminate\Http\Request; | |
use Illuminate\Database\Eloquent\ModelNotFoundException; | |
trait CrudTrait | |
{ | |
use LockableTrait; // LockableTraitを使用 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- phpMyAdmin SQL Dump | |
-- version 5.2.1 | |
-- https://www.phpmyadmin.net/ | |
-- | |
-- ホスト: database:3306 | |
-- 生成日時: 2024 年 10 月 13 日 05:13 | |
-- サーバのバージョン: 8.4.2 | |
-- PHP のバージョン: 8.2.19 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!function_exists('createCustomDirectoryFromFilename')) { | |
/** | |
* ファイル名からハッシュを生成し、対応するディレクトリを作成します。 | |
* | |
* @param string $filename | |
* @param int $initialDirLength 最初のディレクトリの文字数 | |
* @param int $subDirLevels サブディレクトリの数 | |
* @param string $baseDir ベースディレクトリ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Traits; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\Carbon; | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Support\Facades\Log; | |
trait LockableTrait |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type FormContent = { | |
type: 'formElement' | 'formField' | 'html' | 'string'; | |
content: FormElement[] | FormField[] | HTMLElement[] | string; | |
}; | |
type FormField = { | |
legend: string; | |
isLegendIndicateRequired: boolean; | |
formElements: FormElement[]; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Schema::create('medical_workers', function (Blueprint $table) { | |
$table->increments('id'); // BigIncrementsで、PK。おまじない。 | |
$table->string('name')->unique(); // あえてnameはユニーク | |
$table->string('secret_question'); // 秘密の質問。平文 | |
$table->string('secret_question'); // 秘密の質問の回答。ハッシュ化文字列で来てほしい。 | |
$table->datetime('created_at'); | |
$table->datetime('updated_at')->nullable(); | |
$table->datetime('deleted_at')->nullable(); | |
}); |
OlderNewer