| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace App\Http\Controllers\Admin\User\Dormant\Form;
- use Illuminate\Http\Request;
- use App\Http\Controllers\Controller;
- use App\Models\Config;
- class SmsController extends Controller
- {
- private Config $configModel;
- public function __construct(Config $config)
- {
- $this->configModel = $config;
- }
- /**
- * 휴면 계정 관리(문자) - 알림 발송 양식
- * @method GET
- * @see /admin/user/dormant/form/sms
- */
- public function index()
- {
- return view('admin.user.dormant.form.sms', []);
- }
- /**
- * 휴면 계정 관리(문자) - 알림 발송 양식 저장
- * @method POST
- * @see /admin/user/dormant/form/sms
- */
- public function store(Request $request)
- {
- $rules = [
- 'send_sms_dormant_form_content' => 'string|nullable',
- 'send_sms_dormancy_form_content' => 'string|nullable',
- 'send_sms_recover_form_content' => 'string|nullable'
- ];
- $attributes = [
- 'send_sms_dormant_form_content' => '휴면 예정',
- 'send_sms_dormancy_form_content' => '휴면 전환',
- 'send_sms_recover_form_content' => '휴면 해제'
- ];
- $posts = $this->validate($request, $rules, [], $attributes);
- $this->configModel->save($posts, $attributes);
- $message = '문자 양식 정보가 저장되었습니다.';
- return redirect()->route('admin.user.dormant.form.sms.index')->with('message', $message);
- }
- }
|