1 year ago

Passing variable between two functions in same controller

Posted 1 year ago by nionta

Here is my code:

public function companyandpersonselection(Request $request)
    $person_type = $request->get('person_type');
    $company_id = $request->get('company_id');
     return $person_type;

 * Show the form for creating a new resource.
 * @return \Illuminate\Http\Response
public function valuepass(Request $request)
   $test = $this->companyandpersonselection($request);
   // return view('admin.academicuser.createuser');


but,my second function pass out ""null", but in 1st one the "variable" has a value. why it's not working?

Please sign in or create an account to participate in this conversation.