mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#4527 SEO optimise for openclassify.com (ahrefs.com)
This commit is contained in:
parent
b3a715c7dd
commit
e8533fc309
@ -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')
|
||||
|
||||
@ -70,8 +70,6 @@ interface AdvInterface extends EntryInterface
|
||||
|
||||
public function getRecommended($id);
|
||||
|
||||
public function authControl();
|
||||
|
||||
public function inStock();
|
||||
|
||||
public function getCity();
|
||||
|
||||
@ -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'));
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
$('.categories-list .show-all').on('click', function () {
|
||||
$(this).siblings('.hidden-category').toggleClass('hidden')
|
||||
$(this).find('a span').toggleClass('hidden')
|
||||
})
|
||||
});
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user