When i comment the inserting query, the return works.but with the query return is not working.it would be great if anyone can help immediatly
public function regCustomer()
{
$arr = [];
$cus_name = Input::get('cusname');
$cus_address = Input::get( 'address' );
$cus_phone = Input::get( 'phone' );
$cus_email = Input::get( 'email' );
try{
DB::table('Customers')->insert(
array(
'customer_name' => $cus_name,
'address' => $cus_address,
'phone' => $cus_phone,
'email' => $cus_email
)
);
return 1;
}catch(Exception $ex){
return '0';
}
}