wyyl/beike/Shop/View/Components/AccountSidebar.php

33 lines
636 B
PHP

<?php
namespace Beike\Shop\View\Components;
use Beike\Models\Customer;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class AccountSidebar extends Component
{
private $customer;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct()
{
$this->customer = auth(Customer::AUTH_GUARD)->user();
}
/**
* Get the view / contents that represent the component.
*
* @return View|
*/
public function render(): View
{
return view('components.account.sidebar', ['customer' => $this->customer]);
}
}