app/Http/Controllers/Admin/EssayAssignmentsController.php
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
Show the form for creating a new resource.
@return \Illuminate\Http\Response
Show the form for creating a new resource . @return \ Illuminate \ Http \ Response
public function create()
    {
        $tutors = Role::find(config('global.TUTOR_ROLE_ID'))->users()->get();
        $students = Role::find(config('global.STUDENT_ROLE_ID'))->users()->get();
        $a_num = EssayAssignment::all()->last()['assignment_num'] + 1;
        $essay_statuses = EssayStatus::all();
        $data = [
            'a_num'     => $a_num,
            'tutors'    => $tutors,
            'students'  => $students,
            'statuses'  => $essay_statuses,
        ];
        return view('admin.essayassignments.create')->with('data', $data);
    }
public function create ( ) { $ tutors = Role :: find ( config ( 'global.TUTOR_ROLE_ID' ) ) -> users ( ) -> get ( ) ; $ students = Role :: find ( config ( 'global.STUDENT_ROLE_ID' ) ) -> users ( ) -> get ( ) ; $ a_num = EssayAssignment :: all ( ) -> last ( ) [ 'assignment_num' ] + 1 ; $ essay_statuses = EssayStatus :: all ( ) ; $ data = [ 'a_num' => $ a_num , 'tutors' => $ tutors , 'students' => $ students , 'statuses' => $ essay_statuses , ] ; return view ( 'admin.essayassignments.create' ) -> with ( 'data' , $ data ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .