DEV: Мелкие изменения
This commit is contained in:
parent
cfd381c3e9
commit
ef4d3639d8
|
@ -16,37 +16,34 @@ class AnswerController extends \MainController
|
|||
// Все ответы
|
||||
public function index()
|
||||
{
|
||||
$pg = \Request::getInt('page');
|
||||
$page = (!$pg) ? 1 : $pg;
|
||||
$uid = Base::getUid();
|
||||
$page = \Request::getInt('page');
|
||||
$page = $page == 0 ? 1 : $page;
|
||||
|
||||
$uid = Base::getUid();
|
||||
|
||||
$limit = 25;
|
||||
$pagesCount = AnswerModel::getAnswersAllCount();
|
||||
$answ = AnswerModel::getAnswersAll($page, $uid['trust_level']);
|
||||
$answ = AnswerModel::getAnswersAll($page, $limit, $uid);
|
||||
|
||||
$result = Array();
|
||||
foreach ($answ as $ind => $row) {
|
||||
$row['answer_content'] = Content::text($row['answer_content'], 'text');
|
||||
$row['date'] = lang_date($row['answer_date']);
|
||||
// N+1 - перенести в запрос
|
||||
$row['answer_vote_status'] = VotesModel::voteStatus($row['answer_id'], $uid['id'], 'answer');
|
||||
$result[$ind] = $row;
|
||||
$result[$ind] = $row;
|
||||
}
|
||||
|
||||
$num = ' | ';
|
||||
if ($page > 1) {
|
||||
$num = ' — ' . lang('Page') . ' ' . $page;
|
||||
} else {
|
||||
$num = '';
|
||||
}
|
||||
$num = sprintf(lang('page-number'), $page) . ' | ';
|
||||
}
|
||||
|
||||
$data = [
|
||||
'h1' => lang('All answers'),
|
||||
'pagesCount' => $pagesCount,
|
||||
'pagesCount' => ceil($pagesCount / $limit),
|
||||
'pNum' => $page,
|
||||
'canonical' => Config::get(Config::PARAM_URL) . '/answers',
|
||||
'sheet' => 'answers',
|
||||
'meta_title' => lang('All answers') .' | '. Config::get(Config::PARAM_NAME),
|
||||
'meta_desc' => lang('answers-desc') .' '. Config::get(Config::PARAM_HOME_TITLE),
|
||||
'meta_title' => lang('All answers') . $num . Config::get(Config::PARAM_NAME),
|
||||
'meta_desc' => lang('answers-desc') . $num . Config::get(Config::PARAM_HOME_TITLE),
|
||||
];
|
||||
|
||||
return view(PR_VIEW_DIR . '/answer/answers', ['data' => $data, 'uid' => $uid, 'answers' => $result]);
|
||||
|
@ -157,9 +154,7 @@ class AnswerController extends \MainController
|
|||
$answer_id = \Request::getPostInt('answer_id');
|
||||
$answer = AnswerModel::getAnswerOne($answer_id);
|
||||
|
||||
if (!$answer) {
|
||||
redirect('/');
|
||||
}
|
||||
Base::PageRedirection($answer);
|
||||
|
||||
AnswerModel::setAnswerFavorite($answer_id, $uid['id']);
|
||||
|
||||
|
|
|
@ -15,68 +15,39 @@ class CommentController extends \MainController
|
|||
// Все комментарии
|
||||
public function index()
|
||||
{
|
||||
$pg = \Request::getInt('page');
|
||||
$page = (!$pg) ? 1 : $pg;
|
||||
|
||||
$uid = Base::getUid();
|
||||
|
||||
$page = \Request::getInt('page');
|
||||
$page = $page == 0 ? 1 : $page;
|
||||
|
||||
$limit = 25;
|
||||
$pagesCount = CommentModel::getCommentAllCount();
|
||||
$comm = CommentModel::getCommentsAll($page, $uid['trust_level']);
|
||||
$comments = CommentModel::getCommentsAll($page, $limit, $uid);
|
||||
|
||||
$result = Array();
|
||||
foreach ($comm as $ind => $row) {
|
||||
foreach ($comments as $ind => $row) {
|
||||
$row['date'] = lang_date($row['comment_date']);
|
||||
$row['comment_content'] = Content::text($row['comment_content'], 'line');
|
||||
$row['comment_vote_status'] = VotesModel::voteStatus($row['comment_id'], $uid['id'], 'comment');
|
||||
$result[$ind] = $row;
|
||||
}
|
||||
|
||||
$num = ' | ';
|
||||
if ($page > 1) {
|
||||
$num = ' — ' . lang('Page') . ' ' . $page;
|
||||
} else {
|
||||
$num = '';
|
||||
}
|
||||
$num = sprintf(lang('page-number'), $page) . ' | ';
|
||||
}
|
||||
|
||||
$data = [
|
||||
'h1' => lang('All comments'),
|
||||
'pagesCount' => $pagesCount,
|
||||
'pagesCount' => ceil($pagesCount / $limit),
|
||||
'pNum' => $page,
|
||||
'canonical' => Config::get(Config::PARAM_URL) . '/comments',
|
||||
'sheet' => 'comments',
|
||||
'meta_title' => lang('All comments') .' | '. Config::get(Config::PARAM_NAME),
|
||||
'meta_desc' => lang('comments-desc') .' '. Config::get(Config::PARAM_HOME_TITLE),
|
||||
'meta_title' => lang('All comments') . $num . Config::get(Config::PARAM_NAME),
|
||||
'meta_desc' => lang('comments-desc') . $num . Config::get(Config::PARAM_HOME_TITLE),
|
||||
];
|
||||
|
||||
return view(PR_VIEW_DIR . '/comment/comments', ['data' => $data, 'uid' => $uid, 'comments' => $result]);
|
||||
}
|
||||
|
||||
// Редактируем комментарий
|
||||
public function editComment()
|
||||
{
|
||||
$comment_id = \Request::getPostInt('comment_id');
|
||||
$post_id = \Request::getPostInt('post_id');
|
||||
$comment_content = \Request::getPost('comment');
|
||||
|
||||
// Получим относительный url поста для возрата
|
||||
$post = PostModel::postId($post_id);
|
||||
$redirect = '/post/' . $post['post_id'] . '/' . $post['post_slug'] . '#comment_' . $comment_id;
|
||||
|
||||
// id того, кто редактирует
|
||||
$uid = Base::getUid();
|
||||
$user_id = $uid['id'];
|
||||
|
||||
$comment = CommentModel::getCommentsOne($comment_id);
|
||||
|
||||
// Проверка доступа
|
||||
if (!accessСheck($comment, 'comment', $uid, 0, 0)) {
|
||||
redirect('/');
|
||||
}
|
||||
|
||||
// Редактируем комментарий
|
||||
CommentModel::CommentEdit($comment_id, $comment_content);
|
||||
redirect($redirect);
|
||||
}
|
||||
|
||||
// Покажем форму редактирования
|
||||
public function editCommentForm()
|
||||
{
|
||||
|
@ -101,6 +72,32 @@ class CommentController extends \MainController
|
|||
return view(PR_VIEW_DIR . '/comment/edit-form-comment', ['data' => $data]);
|
||||
}
|
||||
|
||||
// Редактируем комментарий
|
||||
public function editComment()
|
||||
{
|
||||
$uid = Base::getUid();
|
||||
$comment_id = \Request::getPostInt('comment_id');
|
||||
$post_id = \Request::getPostInt('post_id');
|
||||
$comment_content = \Request::getPost('comment');
|
||||
|
||||
// Получим относительный url поста для возрата
|
||||
$post = PostModel::postId($post_id);
|
||||
Base::PageRedirection($post);
|
||||
|
||||
$comment = CommentModel::getCommentsOne($comment_id);
|
||||
|
||||
// Проверка доступа
|
||||
if (!accessСheck($comment, 'comment', $uid, 0, 0)) {
|
||||
redirect('/');
|
||||
}
|
||||
|
||||
$redirect = '/post/' . $post['post_id'] . '/' . $post['post_slug'] . '#comment_' . $comment['comment_id'];
|
||||
|
||||
// Редактируем комментарий
|
||||
CommentModel::CommentEdit($comment['comment_id'], $comment_content);
|
||||
redirect($redirect);
|
||||
}
|
||||
|
||||
// Покажем форму ответа
|
||||
public function addForm()
|
||||
{
|
||||
|
|
|
@ -42,9 +42,9 @@ class HomeController extends \MainController
|
|||
$result_comm[$ind] = $row;
|
||||
}
|
||||
|
||||
$num = '';
|
||||
$num = ' | ';
|
||||
if ($page > 1) {
|
||||
$num = ' | ' . lang('Page') . ' ' . $page;
|
||||
$num = sprintf(lang('page-number'), $page);
|
||||
}
|
||||
|
||||
$meta_title = Config::get(Config::PARAM_HOME_TITLE) . $num;
|
||||
|
@ -52,13 +52,13 @@ class HomeController extends \MainController
|
|||
$canonical = Config::get(Config::PARAM_URL);
|
||||
|
||||
if ($sheet == 'top') {
|
||||
$meta_title = lang('TOP') .'. '. Config::get(Config::PARAM_HOME_TITLE) . $num;
|
||||
$meta_title = lang('TOP') . $num . Config::get(Config::PARAM_HOME_TITLE) . $num;
|
||||
$meta_desc = lang('top-desc') . $num;
|
||||
$canonical = Config::get(Config::PARAM_URL) . '/top';
|
||||
}
|
||||
|
||||
if ($sheet == 'all') {
|
||||
$meta_title = lang('All') .'. '. Config::get(Config::PARAM_HOME_TITLE) . $num;
|
||||
$meta_title = lang('All') . $num . Config::get(Config::PARAM_HOME_TITLE) . $num;
|
||||
}
|
||||
|
||||
$data = [
|
||||
|
|
|
@ -12,17 +12,26 @@ class LinkController extends \MainController
|
|||
public function index()
|
||||
{
|
||||
$uid = Base::getUid();
|
||||
$pg = \Request::getInt('page');
|
||||
$page = (!$pg) ? 1 : $pg;
|
||||
$page = \Request::getInt('page');
|
||||
$page = $page == 0 ? 1 : $page;
|
||||
|
||||
$links = LinkModel::getLinksAll($uid['id'], $page);
|
||||
$limit = 25;
|
||||
$pagesCount = LinkModel::getLinksAllCount();
|
||||
$links = LinkModel::getLinksAll($page, $limit, $uid['id']);
|
||||
|
||||
$num = ' | ';
|
||||
if ($page > 1) {
|
||||
$num = sprintf(lang('page-number'), $page) . ' | ';
|
||||
}
|
||||
|
||||
$data = [
|
||||
'h1' => lang('domains-title'),
|
||||
'canonical' => '/domains',
|
||||
'sheet' => 'domains',
|
||||
'meta_title' => lang('domains-title') .' | '. Config::get(Config::PARAM_NAME),
|
||||
'meta_desc' => lang('domains-desc'),
|
||||
'pagesCount' => ceil($pagesCount / $limit),
|
||||
'pNum' => $page,
|
||||
'meta_title' => lang('domains-title') . $num . Config::get(Config::PARAM_NAME),
|
||||
'meta_desc' => lang('domains-desc') . $num . Config::get(Config::PARAM_HOME_TITLE),
|
||||
];
|
||||
|
||||
return view(PR_VIEW_DIR . '/link/links', ['data' => $data, 'uid' => $uid, 'links' => $links]);
|
||||
|
|
|
@ -402,9 +402,7 @@ class PostController extends \MainController
|
|||
$post_id = \Request::getPostInt('post_id');
|
||||
$post = PostModel::postId($post_id);
|
||||
|
||||
if (!$post) {
|
||||
redirect('/');
|
||||
}
|
||||
Base::PageRedirection($post);
|
||||
|
||||
PostModel::setPostFavorite($post_id, $uid['id']);
|
||||
|
||||
|
|
|
@ -405,7 +405,6 @@ class PublishController extends \MainController
|
|||
// Проверка доступа
|
||||
$info_type = PublishModel::getInfoTypeContent($type_id, $type);
|
||||
|
||||
|
||||
if (!accessСheck($info_type, $type, $uid, 1, 30)) {
|
||||
redirect('/');
|
||||
}
|
||||
|
|
|
@ -319,7 +319,7 @@ return [
|
|||
'desc-user-all' => 'Список всех участников сортированных по дате регистрации на сайте',
|
||||
'title-profile' => '%1$s %2$s | Профиль на %3$s',
|
||||
'desc-profile' => '%1$s - страница профиля участника. %2$s Посты, комментарии, награды на %3$s',
|
||||
'page-number' => ' — страница %1$s | ',
|
||||
'page-number' => ' — страница %1$s ',
|
||||
'home-desc' => 'Главная страница сообщества, форум, посты',
|
||||
'top-desc' => 'Список популярных постов в сообществе (по количеству ответов)',
|
||||
'search-desc' => 'Поиск по сайту. По названию и тексту постов. По пространствам и участникам',
|
||||
|
|
|
@ -238,7 +238,6 @@ class Base
|
|||
return true;
|
||||
}
|
||||
|
||||
// Ошибка 404
|
||||
public static function PageError404($variable)
|
||||
{
|
||||
if (!$variable) {
|
||||
|
@ -248,6 +247,14 @@ class Base
|
|||
return true;
|
||||
}
|
||||
|
||||
public static function PageRedirection($variable)
|
||||
{
|
||||
if (!$variable) {
|
||||
redirect('/');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Обрезка текста по словам
|
||||
public static function cutWords($content, $maxlen)
|
||||
{
|
||||
|
|
|
@ -7,21 +7,32 @@ use PDO;
|
|||
class AnswerModel extends \MainModel
|
||||
{
|
||||
// Все ответы
|
||||
public static function getAnswersAll($page, $trust_level)
|
||||
public static function getAnswersAll($page, $limit, $uid)
|
||||
{
|
||||
$offset = ($page-1) * 25;
|
||||
|
||||
$tl = 'AND p.post_tl = 0';
|
||||
if ($trust_level) {
|
||||
$tl = 'AND p.post_tl <= '.$trust_level.'';
|
||||
$tl = 'AND post_tl = 0';
|
||||
if ($uid['trust_level']) {
|
||||
$tl = 'AND post_tl <= '.$uid['trust_level'].'';
|
||||
}
|
||||
|
||||
$sql = "SELECT c.*, p.*,
|
||||
u.id, u.login, u.avatar
|
||||
FROM answers as c
|
||||
JOIN users as u ON u.id = c.answer_user_id
|
||||
JOIN posts as p ON c.answer_post_id = p.post_id AND c.answer_is_deleted = 0 ".$tl."
|
||||
ORDER BY c.answer_id DESC LIMIT 25 OFFSET ".$offset." ";
|
||||
$start = ($page-1) * $limit;
|
||||
$sql = "SELECT
|
||||
post_id,
|
||||
post_title,
|
||||
post_slug,
|
||||
answer_id,
|
||||
answer_content,
|
||||
answer_date,
|
||||
answer_user_id,
|
||||
answer_post_id,
|
||||
answer_votes,
|
||||
answer_is_deleted,
|
||||
id,
|
||||
login,
|
||||
avatar
|
||||
FROM answers
|
||||
INNER JOIN users ON id = answer_user_id
|
||||
INNER JOIN posts ON answer_post_id = post_id AND answer_is_deleted = 0 ".$tl."
|
||||
ORDER BY answer_id DESC LIMIT $start, $limit ";
|
||||
|
||||
return DB::run($sql)->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
@ -29,9 +40,9 @@ class AnswerModel extends \MainModel
|
|||
// Количество ответов
|
||||
public static function getAnswersAllCount()
|
||||
{
|
||||
$query = XD::select('*')->from(['answers'])->where(['answer_is_deleted'], '=', 0)->getSelect();
|
||||
|
||||
return ceil(count($query) / 25);
|
||||
$sql = "SELECT answer_id, answer_is_deleted FROM answers WHERE answer_is_deleted = 0";
|
||||
|
||||
return DB::run($sql)->rowCount();
|
||||
}
|
||||
|
||||
// Получаем лучший комментарий (LO)
|
||||
|
|
|
@ -8,22 +8,36 @@ use PDO;
|
|||
class CommentModel extends \MainModel
|
||||
{
|
||||
// Все комментарии
|
||||
public static function getCommentsAll($page, $trust_level)
|
||||
public static function getCommentsAll($page, $limit, $uid)
|
||||
{
|
||||
$offset = ($page-1) * 25;
|
||||
|
||||
if (!$trust_level) {
|
||||
$tl = 'AND p.post_tl = 0';
|
||||
if (!$uid['trust_level']) {
|
||||
$tl = 'AND post_tl = 0';
|
||||
} else {
|
||||
$tl = 'AND p.post_tl <= '.$trust_level.'';
|
||||
$tl = 'AND post_tl <= '.$uid['trust_level'].'';
|
||||
}
|
||||
|
||||
$sql = "SELECT c.*, p.*,
|
||||
u.id, u.login, u.avatar
|
||||
fROM comments as c
|
||||
JOIN users as u ON u.id = c.comment_user_id
|
||||
JOIN posts as p ON c.comment_post_id = p.post_id AND c.comment_is_deleted = 0 ".$tl."
|
||||
ORDER BY c.comment_id DESC LIMIT 25 OFFSET ".$offset." ";
|
||||
$start = ($page-1) * $limit;
|
||||
$sql = "SELECT
|
||||
post_id,
|
||||
post_title,
|
||||
post_slug,
|
||||
post_tl,
|
||||
comment_id,
|
||||
comment_date,
|
||||
comment_content,
|
||||
comment_post_id,
|
||||
comment_user_id,
|
||||
comment_votes,
|
||||
comment_is_deleted,
|
||||
id,
|
||||
login,
|
||||
avatar
|
||||
|
||||
FROM comments
|
||||
JOIN users ON id = comment_user_id
|
||||
JOIN posts ON comment_post_id = post_id AND comment_is_deleted = 0 ".$tl."
|
||||
|
||||
ORDER BY comment_id DESC LIMIT $start, $limit ";
|
||||
|
||||
return DB::run($sql)->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
@ -31,9 +45,9 @@ class CommentModel extends \MainModel
|
|||
// Количество комментариев
|
||||
public static function getCommentAllCount()
|
||||
{
|
||||
$query = XD::select('*')->from(['comments'])->where(['comment_is_deleted'], '=', 0)->getSelect();
|
||||
$sql = "SELECT comment_id, comment_is_deleted FROM comments WHERE comment_is_deleted = 0";
|
||||
|
||||
return ceil(count($query) / 25);
|
||||
return DB::run($sql)->rowCount();
|
||||
}
|
||||
|
||||
// Получаем комментарии к ответу
|
||||
|
|
|
@ -8,13 +8,32 @@ use PDO;
|
|||
class LinkModel extends \MainModel
|
||||
{
|
||||
// Все сайты
|
||||
public static function getLinksAll($user_id, $page)
|
||||
public static function getLinksAll($page, $limit, $user_id)
|
||||
{
|
||||
$q = XD::select('*')->from(['links']);
|
||||
$query = $q->leftJoin(['votes_link'])->on(['votes_link_item_id'], '=', ['link_id'])
|
||||
->and(['votes_link_user_id'], '=', $user_id)->where(['link_is_deleted'], '=', 0);
|
||||
|
||||
return $query->getSelect();
|
||||
$start = ($page-1) * $limit;
|
||||
$sql = "SELECT
|
||||
link_id,
|
||||
link_title,
|
||||
link_content,
|
||||
link_count,
|
||||
link_url,
|
||||
link_url_domain,
|
||||
link_is_deleted,
|
||||
votes_link_user_id,
|
||||
votes_link_item_id
|
||||
FROM links
|
||||
LEFT JOIN votes_link ON votes_link_item_id = link_id AND votes_link_user_id = $user_id
|
||||
WHERE link_is_deleted = 0
|
||||
ORDER BY link_id DESC LIMIT $start, $limit ";
|
||||
|
||||
return DB::run($sql)->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public static function getLinksAllCount()
|
||||
{
|
||||
$sql = "SELECT link_id, link_is_deleted FROM links WHERE link_is_deleted = 0";
|
||||
|
||||
return DB::run($sql)->rowCount();
|
||||
}
|
||||
|
||||
// 5 популярных доменов
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</a>
|
||||
<span class="date"><?= $answer['date']; ?></span>
|
||||
<span class="indent"> · </span>
|
||||
<a href="/post/<?= $answer['post_id']; ?>/<?= $answer['post_slug']; ?>">
|
||||
<a href="/post/<?= $answer['post_id']; ?>/<?= $answer['post_slug']; ?>#answer_<?= $answer['answer_id']; ?>">
|
||||
<?= $answer['post_title']; ?>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -26,26 +26,9 @@
|
|||
<div class="answ-telo-body">
|
||||
<?= $answer['answer_content']; ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="post-full-footer date">
|
||||
<?php if (!$uid['id']) { ?>
|
||||
<div class="voters">
|
||||
<a rel="nofollow" href="/login"><div class="up-id"></div></a>
|
||||
<div class="score"><?= $answer['answer_votes']; ?></div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<?php if ($answer['answer_vote_status'] || $uid['id'] == $answer['answer_user_id']) { ?>
|
||||
<div class="voters active">
|
||||
<div class="up-id"></div>
|
||||
<div class="score"><?= $answer['answer_votes']; ?></div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div id="up<?= $answer['answer_id']; ?>" class="voters">
|
||||
<div data-id="<?= $answer['answer_id']; ?>" data-type="answer" class="up-id"></div>
|
||||
<div class="score"><?= $answer['answer_votes']; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
+ <?= $answer['answer_votes']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
<span class="date"><?= $comment['date']; ?></span>
|
||||
|
||||
<span class="indent"> · </span>
|
||||
<a href="/post/<?= $comment['post_id']; ?>/<?= $comment['post_slug']; ?>"><?= $comment['post_title']; ?></a>
|
||||
<a href="/post/<?= $comment['post_id']; ?>/<?= $comment['post_slug']; ?>#comment_<?= $comment['comment_id']; ?>">
|
||||
<?= $comment['post_title']; ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="comm-telo-body">
|
||||
|
@ -26,24 +28,7 @@
|
|||
</div>
|
||||
|
||||
<div class="post-full-footer date">
|
||||
<?php if (!$uid['id']) { ?>
|
||||
<div class="voters">
|
||||
<a rel="nofollow" href="/login"><div class="up-id"></div></a>
|
||||
<div class="score"><?= $comment['comment_votes']; ?></div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<?php if ($comment['comment_vote_status'] || $uid['id'] == $comment['comment_user_id']) { ?>
|
||||
<div class="voters active">
|
||||
<div class="up-id"></div>
|
||||
<div class="score"><?= $comment['comment_votes']; ?></div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div id="up<?= $comment['comment_id']; ?>" class="voters">
|
||||
<div data-id="<?= $comment['comment_id']; ?>" data-type="comment" class="up-id"></div>
|
||||
<div class="score"><?= $comment['comment_votes']; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
+ <?= $comment['comment_votes']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?= pagination($data['pNum'], $data['pagesCount'], $data['sheet'], '/domains'); ?>
|
||||
</main>
|
||||
<aside>
|
||||
<div class="white-box">
|
||||
|
|
|
@ -230,6 +230,7 @@ Route::get('/topic/{slug}/page/{page?}')->controller('TopicController@topic')->w
|
|||
|
||||
// Домены
|
||||
Route::get('/domains')->controller('LinkController');
|
||||
Route::get('/domains/page/{page?}')->controller('LinkController')->where(['page' => '[0-9]+']);
|
||||
Route::get('/domain/{domain}')->controller('LinkController@domain')->where(['domain' => '[A-Za-z0-9-.]+']);
|
||||
|
||||
// Пагинация и главная (feed) страница, top, all...
|
||||
|
|
Loading…
Reference in a new issue