<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class NoticeBoardController extends Controller
{
    public function index() {
        $pageTitle = 'Notice Board';
        return view('admin.notice_board', compact('pageTitle'));
    }

    public function noticeForAllUpdate(Request $request) {
        $general = gs();
        $general->notice_for_all = $request->notice_for_all;
        $general->save();

        $notify[] = ['success', 'Notice for all updated!'];
        return back()->withNotify($notify);
    }
}
