I have upload my files to a new server and error occurres in this line
if(empty($data['customer_id'])) -- Error in thisline
with message syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)
the data is comming from
public function store(Request $request)
{
$data = $request->all();
if(empty($data['customer_id']))
$data['customer_id'] = Customer::create($data)->id;
If I change it to $data->customer_id it is not throwing error