I got an error:
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Call to a member function address() on null
AddressController.php
public function store(Request $request)
{
$this->validate($request,[
'fname'=>'required',
'lname'=>'required',
'addressline'=>'required',
'city'=>'required',
'phone'=>'required |regex:/^[0-9\-\+]{9,15}$/',
]);
Auth::user()->address()->create($request->all());
Order::createOrder();
return redirect('/');
}