Example, I want to save $id below to a place. Then I can use in other controllers or views.
class StudyController extends Controller
{
public function show($id)
{
$item = Course::findOrFail($id);
$theories = Theory::WHERE('subpart', $item->subpart)->get();
return view('pages.teacher.class.dashboard-class-study', [
'items' => $theories,
'idCourse' => $id,
]);
}
Aucun commentaire:
Enregistrer un commentaire