role == "admin")
{
$courses = Course::get();
}
else{
$courses = Course::where('user_id', Auth::user()->id)->get();
}
$attandance = Attandance::get();
return view('admin.attandance.index',compact('attandance', 'courses'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param \App\Attandance $attandance
* @return \Illuminate\Http\Response
*/
public function show(Attandance $attandance)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Attandance $attandance
* @return \Illuminate\Http\Response
*/
public function edit(Attandance $attandance)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Attandance $attandance
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Attandance $attandance)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param \App\Attandance $attandance
* @return \Illuminate\Http\Response
*/
public function destroy(Attandance $attandance)
{
//
}
}