<?php

namespace App\Http\Controllers\User;

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

class UserNewsNoticeController extends Controller
{
    //News And Notice Details
    public function UserNewsNoticeDetails($id, $slug){
        $news_notice = NewsNotice::find($id);
        $related_notice = NewsNotice::where('id','!=',$id)->get();
        return view('user.notice.notice_details',compact('news_notice','related_notice'));
    }

    //Notice Details
    public function UserNoticeListView()
    {
        $news = NewsNotice::where('public', 1)->latest()->paginate(18);
        return view('user.notice.notice', compact('news'));
    }
}
