FleetCart/Modules/Account/Http/Controllers/AccountDefaultAddressController.php
2023-06-11 13:14:03 +01:00

25 lines
603 B
PHP

<?php
namespace Modules\Account\Http\Controllers;
use Illuminate\Routing\Controller;
use Modules\Address\Entities\DefaultAddress;
class AccountDefaultAddressController extends Controller
{
/**
* Update the specified resource in storage.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function update()
{
DefaultAddress::updateOrCreate(
['customer_id' => auth()->id()],
['address_id' => request('address_id')]
);
return trans('account::messages.default_address_updated');
}
}