I'm using Laravel to create a complex registration form. Now I want to use the Company Object throughout the whole process.
I'm currently creating a new Company object in the constructor as follows:
public function __construct() { $this->company = new Company(); } And then I fill the object with data from an API.
But the object is returning null every time I hit a new method or route.
I don't see any other way of going about this? Any idea's? Thanks!
The following is working
return redirect()->route('register.contacts')->with('company', $company); And in the contacts method
public function contacts() { Session::get('company')); }