<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\About;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
use Brian2694\Toastr\Facades\Toastr;

class AdminAboutController extends Controller
{
    //Admin About Update
    public function AdminAboutUpdate()
    {
        Session::put('admin_page', 'admin_about_view');
        $about_update = About::find(1);
        return view('admin.about.about', compact('about_update'));
    }

    //Admin About Update
    public function AdminAboutUpdateStore(Request $request)
    {
        $about_update = About::find(1);
        $about_update->title = $request->title;
        $about_update->about = $request->about;
        $about_update->save();
        Toastr::success('About Updated Successfully');
        return redirect()->back();
    }

  
}
