app/Http/Controllers/AssignRequirementController.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($id)
    {
        $requirement 		= Requirement::find($id);
        $analysts			= User::find($requirement->created_by)->analysts;
        $analystsArray 		= array();
        $analystsArray[''] 	= '';
        foreach ($analysts as $analyst) {
            $analystsArray[$analyst->id] = $analyst->first_name." ".$analyst->last_name;       
        }
        return view('requirements.assign', [
        	'requirement'	=> $requirement,
            'analysts'   	=> $analystsArray
        ]);
    }
public function create ( $ id ) { $ requirement = Requirement :: find ( $ id ) ; $ analysts = User :: find ( $ requirement -> created_by ) -> analysts ; $ analystsArray = array ( ) ; $ analystsArray [ '' ] = '' ; foreach ( $ analysts as $ analyst ) { $ analystsArray [ $ analyst -> id ] = $ analyst -> first_name . " " . $ analyst -> last_name ; } return view ( 'requirements.assign' , [ 'requirement' => $ requirement , 'analysts' => $ analystsArray ] ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .