28 lines
665 B
PHP
28 lines
665 B
PHP
<?php
|
|
|
|
namespace Modules\CityManager\Http\Livewire;
|
|
|
|
use Livewire\Component;
|
|
use Modules\CityManager\Models\CityManager;
|
|
|
|
class CityManagerInfo extends Component
|
|
{
|
|
public $manager = false;
|
|
public function mount()
|
|
{
|
|
$city = false;
|
|
if (($company = AdminCompanyOfUser()) || ($company = AgentCompanyOfUser()))
|
|
{
|
|
//print_r($company);
|
|
if ($cityManager = CityManager::where('city_id', $company->city->id)->first())
|
|
{
|
|
$this->manager = $cityManager->user;
|
|
}
|
|
}
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('citymanager::livewire.info.index');
|
|
}
|
|
} |