Commit although could not run on localhost

This commit is contained in:
Obenny
2020-10-08 14:49:49 +08:00
parent fcfe19f0fa
commit 50a69439a1
9 changed files with 273 additions and 0 deletions
@@ -0,0 +1,24 @@
<?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'));
}
}