app/Http/Controllers/Tutor/ReportCardsController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\ProgressReport  $progressReport
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.
Show the form for editing the specified resource .
public function edit(ProgressReport $reportcard)
    {
        $myuser = Auth::User();
        $students = Array();
        foreach($myuser->tutor_assignments()->get() as $assignments)
        {
            $students[] = $assignments->student();
        }
        $students = array_unique($students);
        $data = [
            'report'    => $reportcard,
            'students'  => $students,
        ];
        return view('tutor.reportcards.edit') -> with('data', $data);
    }
public function edit ( ProgressReport $ reportcard ) { $ myuser = Auth :: User ( ) ; $ students = Array ( ) ; foreach ( $ myuser -> tutor_assignments ( ) -> get ( ) as $ assignments ) { $ students [ ] = $ assignments -> student ( ) ; } $ students = array_unique ( $ students ) ; $ data = [ 'report' => $ reportcard , 'students' => $ students , ] ; return view ( 'tutor.reportcards.edit' ) -> with ( 'data' , $ data ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .