示例#1
0
 public function delwalk($id)
 {
     if (Auth::guest()) {
         \Session::flash('msg', ' No Permission for that Request');
         return redirect('job');
     }
     $trg = Walkins::findOrFail($id);
     if (Auth::id() != $trg['Employer_id']) {
         \Session::flash('msg', ' No Permission for that Request');
         return redirect('job');
     }
     if (Walkins::find($id)->delete()) {
         \Session::flash('msg', 'You Have Successfully Deleted Walkin : ' . $trg->title);
         return redirect('job/walkins');
     }
 }
示例#2
0
 public function walkins()
 {
     $wlk = Walkins::latest('created_at')->where('created_at', '<=', Carbon::now())->where('created_at', '<=', 'closing_date')->get();
     return view('job.walkins', compact('wlk'));
 }