This commit is contained in:
vedatakd 2020-01-24 16:14:18 +03:00
parent 287161392d
commit 48c059b3db
2 changed files with 7 additions and 1 deletions

View File

@ -352,4 +352,11 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
}
return null;
}
public function authControl()
{
if (!Auth::user()) {
redirect('/login?redirect=' . url()->current())->send();
}
}
}

View File

@ -163,7 +163,6 @@ class AdvsController extends PublicController
foreach ($featured_advs as $index => $ad) {
$featured_advs[$index]->detail_url = $this->adv_model->getAdvDetailLinkByModel($ad, 'list');
$featured_advs[$index]->price = number_format($ad->price);
$featured_advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad);
}