diff --git a/backend/app/Http/Controllers/Api/ChildrenController.php b/backend/app/Http/Controllers/Api/ChildrenController.php index 25299647..64e2c098 100644 --- a/backend/app/Http/Controllers/Api/ChildrenController.php +++ b/backend/app/Http/Controllers/Api/ChildrenController.php @@ -176,7 +176,7 @@ class ChildrenController extends Controller { // 失敗 Log::critical($e->getMessage()); DB::rollback(); - Storage::disk('private')->delete($filename); + if (!is_null($r->image)) Storage::disk('private')->delete($filename); return ['status_code' => 400, 'error_messages' => ['登録に失敗しました。']]; } diff --git a/backend/app/Http/Controllers/Api/MeetingsController.php b/backend/app/Http/Controllers/Api/MeetingsController.php index 51e39ddf..ca66e9a2 100644 --- a/backend/app/Http/Controllers/Api/MeetingsController.php +++ b/backend/app/Http/Controllers/Api/MeetingsController.php @@ -736,7 +736,7 @@ class MeetingsController extends Controller { 'title' => 'required|max:100', 'text' => 'required|max:2000', 'memo' => 'nullable|max:2000', - 'pdf' => 'pdf_size_pdf_meme', + 'pdf' => 'pdf_size|pdf_meme', ]); if ($validate->fails()) { @@ -808,8 +808,27 @@ class MeetingsController extends Controller { } public function delete ($meeting_id) { + $delimg = false; + if (!isset($meeting_id)) { + return ['status_code' => 400]; + } + + if (null === ($get = Meetings::select('pdf')->where('id', (int)$meeting_id)->get())) { + return ['status_code' => 400]; + } + + if (null !== ($img = MeetingImage::select('image')->where('meeting_id', (int)$meeting_id)->get())) { + $delimg = true; + } + try { Meeting::where('id', (int)$meeting_id)->delete(); + Storage::disk('private')->delete($get->pdf); + if ($delimg) { + foreach ($img as $m) { + Storage::disk('private')->delete($m->image); + } + } } catch (\Throwable $e) { Log::critical($e->getMessage()); return ['status_code' => 400]; diff --git a/backend/app/Mail/FathersRegistrationTemporaryMail.php b/backend/app/Mail/FathersRegistrationTemporaryMail.php index 349ca71a..5a12c259 100644 --- a/backend/app/Mail/FathersRegistrationTemporaryMail.php +++ b/backend/app/Mail/FathersRegistrationTemporaryMail.php @@ -16,7 +16,7 @@ class FathersRegistrationTemporaryMail extends Mailable { } public function build () { - return $this->subject('仮登録が完了しました。')->markdown('emails.fathers.registration.temporary', [ + return $this->subject('【KIKIkan】会員登録のご案内')->markdown('emails.fathers.registration.temporary', [ 'token' => $this->token ]); } diff --git a/backend/resources/views/emails/fathers/registration/temporary.blade.php b/backend/resources/views/emails/fathers/registration/temporary.blade.php index 400f680a..8f33c9d9 100644 --- a/backend/resources/views/emails/fathers/registration/temporary.blade.php +++ b/backend/resources/views/emails/fathers/registration/temporary.blade.php @@ -1,11 +1,30 @@ @component('mail::message') -# 仮登録が完了しました。 +# 【KIKIkan】会員登録のご案内 -サイトへのアカウント仮登録が完了しました。 +KIKIkanサービスの会員登録のご案内です。 -以下のリンクからログインして、本登録を完了させてください。 +KIKIkanシステムのご利用ありがとうございます。 + +※本登録完了後にホーム画面もしくはブックマークに登録してください。 +ログインする際に利用します。 + +下記URLにアクセスし、必要情報をご入力頂き +ユーザー登録を完了してください。 @component('mail::button', ['url' => url('/').'/p-account/register/'.$token]) {{ url('/') }}/p-account/register/{{ $token }} @endcomponent + +なお、URLの有効期限は8時間となります。 +URLの有効期限を過ぎると、再登録が必要になりますので、ご注意ください。 + +※このメールに心当たりがない場合は下記のメールにご連絡ください。 + +■□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□■ + +KIKIkan運営事務局 +56@zotman.jp +{{ url('/') }}/ + +■□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□■ @endcomponent