#4527 SEO optimise for openclassify.com (ahrefs.com)

This commit is contained in:
Muammer Top 2021-09-27 14:12:17 +03:00
parent b3a715c7dd
commit e8533fc309
5 changed files with 5 additions and 23 deletions

View File

@ -436,13 +436,6 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
return null;
}
public function authControl()
{
if (!Auth::user()) {
redirect('/login?redirect=' . url()->current())->send();
}
}
public function currentAds() {
return $this->whereDate('finish_at', '>=', date("Y-m-d H:i:s"))
->where('status', '=', 'approved')

View File

@ -70,8 +70,6 @@ interface AdvInterface extends EntryInterface
public function getRecommended($id);
public function authControl();
public function inStock();
public function getCity();

View File

@ -711,9 +711,7 @@ class AdvsController extends PublicController
public function deleteAd(AdvRepositoryInterface $advs, $id)
{
$ad = $this->adv_model->find($id);
if (!Auth::user()) {
redirect('/login?redirect=' . url()->current())->send();
}
$this->middleware('auth');
if ($ad->created_by_id != Auth::id()) {
$this->messages->error(trans('visiosoft.module.advs::message.delete_author_error'));
@ -745,9 +743,7 @@ class AdvsController extends PublicController
public function create(AdvFormBuilder $formBuilder, CategoryRepositoryInterface $repository)
{
if (!Auth::user()) {
redirect('/login?redirect=' . url()->current())->send();
}
$this->middleware('auth');
$isActive = new AdvModel();
$cats = $this->request->toArray();
@ -1059,9 +1055,7 @@ class AdvsController extends PublicController
public function cats()
{
if (!Auth::user()) {
redirect('/login?redirect=' . url()->current())->send();
}
$this->middleware('auth');
$main_cats = $this->category_repository->getMainCategories();
return $this->view->make('visiosoft.module.advs::new-ad/post-cat', compact('main_cats'));

View File

@ -1,4 +1,4 @@
$('.categories-list .show-all').on('click', function () {
$(this).siblings('.hidden-category').toggleClass('hidden')
$(this).find('a span').toggleClass('hidden')
})
});

View File

@ -34,10 +34,7 @@ class MyProfileController extends PublicController
)
{
parent::__construct();
if (!Auth::user()) {
redirect('/login?redirect=' . url()->current())->send();
}
$this->middleware('auth');
$this->adressRepository = $adressRepository;
$this->userRepository = $userRepository;
}