app/Http/Controllers/Tutor/EssaysController.php
/**
     * Show the form for editing the specified resource.
     * 
     * @param  \App\EssayAssignment  $essayAssignment
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.


Show the form for editing the specified resource .
public function edit(EssayAssignment $essay)
    {
        $statuses = EssayStatus::whereIn('id', Array(1, 3, 4))->get();
        $attachment_name = $essay->attachments()->first()['assignment_name'];
        $data = [
            'essay'         => $essay,
            'statuses'      => $statuses,
            'attachment'    => $attachment_name
        ];
        return view('tutor.essays.edit') -> with('data', $data);
    }
public function edit ( EssayAssignment $ essay ) { $ statuses = EssayStatus :: whereIn ( 'id' , Array ( 1 , 3 , 4 ) ) -> get ( ) ; $ attachment_name = $ essay -> attachments ( ) -> first ( ) [ 'assignment_name' ] ; $ data = [ 'essay' => $ essay , 'statuses' => $ statuses , 'attachment' => $ attachment_name ] ; return view ( 'tutor.essays.edit' ) -> with ( 'data' , $ data ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .