auth preview page

This commit is contained in:
vedatakd 2021-03-29 10:15:54 +03:00
parent 5a86aaa57f
commit 6781349fba
2 changed files with 142 additions and 134 deletions

View File

@ -624,6 +624,10 @@ class AdvsController extends PublicController
$adv = $this->adv_repository->getListItemAdv($id); $adv = $this->adv_repository->getListItemAdv($id);
if (!Auth::check() or ($adv['created_by_id'] != auth()->id() and !Auth::user()->isAdmin())) {
abort(403);
}
for ($i = 1; $i <= 10; $i++) { for ($i = 1; $i <= 10; $i++) {
$cat = "cat" . $i; $cat = "cat" . $i;
if ($adv->$cat != null) { if ($adv->$cat != null) {

View File

@ -93,16 +93,20 @@
"symfony/dom-crawler": "3.1.*", "symfony/dom-crawler": "3.1.*",
"anomaly/installer-module": "~2.3.0" "anomaly/installer-module": "~2.3.0"
}, },
"repositories": [ "repositories": {
{ "0": {
"type": "composer", "type": "composer",
"url": "https://packages.pyrocms.com" "url": "https://packages.pyrocms.com"
}, },
{ "1": {
"type": "composer", "type": "composer",
"url": "https://community.pyrocms.com" "url": "https://community.pyrocms.com"
},
"repo-name": {
"type": "composer",
"url": "https://repo.openclassify.com"
} }
], },
"autoload": { "autoload": {
"classmap": [ "classmap": [
"database" "database"