<?php

namespace App\Http\Controllers\Announcement;//call to announcement controller folder
use App\Http\Controllers\Controller;//call to controller class

use App\Models\Announcement;
use Illuminate\Http\Request;

class ViewAnnouncementController extends Controller
{
    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        $announcements = Announcement::findOrFail($id);
        //returns the page for this route
        return view('announcement.view_announcement', compact('announcements'));
    }

}
