app/Http/Controllers/Admin/PackagesController.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()
    {
        if (Gate::denies('manage-students')) return redirect()->route('admin.packages.index');
        $students = Role::find(config('global.STUDENT_ROLE_ID'))->users()->get();
        $grades = Grade::all();
        $data = [
            'students'  => $students,
            'grades'    => $grades
        ];
        return view('admin.packages.create') -> with('data', $data);
    }
public function create ( ) { if ( Gate :: denies ( 'manage-students' ) ) return redirect ( ) -> route ( 'admin.packages.index' ) ; $ students = Role :: find ( config ( 'global.STUDENT_ROLE_ID' ) ) -> users ( ) -> get ( ) ; $ grades = Grade :: all ( ) ; $ data = [ 'students' => $ students , 'grades' => $ grades ] ; return view ( 'admin.packages.create' ) -> with ( 'data' , $ data ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .