public function page($slug){ $page = Page::where('slug',$slug)->first(); return view('page',[ 'page' => $page, ]); } public function searchProducts(Request $request){ $searchRequest = $request->searchRequest; return view('search',[ 'searchRequest' => $searchRequest, 'products' =>$searchRequest? Product::whereTranslationLike('title', "%$searchRequest%")->get():[], ]); } public function category($slug){ $category = Category::where('slug',$slug)->first(); return view('category',[ 'category' => $category, 'products' => Product::whereIn('id', $category->productIds())->paginate(20), 'characteristics' => $category->getCharacteristics(), 'filterCharacteristicIds' => [], 'filterSizes' => [], 'parentCategories' => Category::find( $category->parentCategoryIds()), ]); } public function categoryFilter($slug,$filterCharacteristicIds='',$sizes=''){ $filterCharacteristicIds = $filterCharacteristicIds? explode(',',$filterCharacteristicIds):[]; $sizes=$sizes?explode(',',$sizes):[]; $category = Category::where('slug',$slug)->first(); return view('category',[ 'category' => $category, 'products' => Product::whereIn('id', $category->filteredProductIds($filterCharacteristicIds,$sizes))->paginate(20), 'characteristics' => $category->getCharacteristics($filterCharacteristicIds), 'filterCharacteristicIds' => $filterCharacteristicIds, 'filterSizes' => $sizes, 'parentCategories' => Category::find( $category->parentCategoryIds()), ]); }
"Call to a member function productIds() on null"
Key | Value |
_url | "/category/shkolnaya-forma-2612181532056"
|
page | "1"
|
Key | Value |
PHPRC | "/home/pop00/.system/php/new0.pop.com.ua.ini"
|
PWD | "/home/pop00/pop.com.ua/new0/"
|
SERVING_HOST_INFO | "apache:php72:1190157:154939:new0.pop.com.ua;"
|
TMP | "/home/pop00/.system/tmp"
|
TMPDIR | "/home/pop00/.system/tmp"
|
SHLVL | "0"
|
TEMP | "/home/pop00/.system/tmp"
|
PATH | "/usr/local/bin:/usr/bin:/bin"
|
HTTP_ACCEPT | "*/*"
|
HTTP_CONNECTION | "close"
|
CONTENT_LENGTH | "0"
|
HTTP_HOST | "new0.pop.com.ua"
|
HTTP_USER_AGENT | "claudebot"
|
HTTP_GEOIP_COUNTRY_CODE | "US"
|
HTTP_X_FORWARDED_PROTO | "http"
|
HTTP_X_INTERNAL_REAL_IP | "54.166.200.255"
|
REDIRECT_REDIRECT_UNIQUE_ID | "ZgayJ3AbIOAuCC9dBtrNbgAAARM"
|
REDIRECT_REDIRECT_SCRIPT_URL | "/category/shkolnaya-forma-2612181532056"
|
REDIRECT_REDIRECT_SCRIPT_URI | "http://new0.pop.com.ua/category/shkolnaya-forma-2612181532056"
|
REDIRECT_REDIRECT_vhost_id | "1190157"
|
REDIRECT_REDIRECT_account_id | "154939"
|
REDIRECT_REDIRECT_PWD | "/home/pop00/pop.com.ua/new0/"
|
REDIRECT_REDIRECT_TMP | "/home/pop00/.system/tmp"
|
REDIRECT_REDIRECT_TEMP | "/home/pop00/.system/tmp"
|
REDIRECT_REDIRECT_STATUS | "200"
|
REDIRECT_UNIQUE_ID | "ZgayJ3AbIOAuCC9dBtrNbgAAARM"
|
REDIRECT_SCRIPT_URL | "/category/shkolnaya-forma-2612181532056"
|
REDIRECT_SCRIPT_URI | "http://new0.pop.com.ua/category/shkolnaya-forma-2612181532056"
|
REDIRECT_vhost_id | "1190157"
|
REDIRECT_account_id | "154939"
|
REDIRECT_PWD | "/home/pop00/pop.com.ua/new0/"
|
REDIRECT_TMP | "/home/pop00/.system/tmp"
|
REDIRECT_TEMP | "/home/pop00/.system/tmp"
|
REDIRECT_STATUS | "200"
|
UNIQUE_ID | "ZgayJ3AbIOAuCC9dBtrNbgAAARM"
|
SCRIPT_URL | "/category/shkolnaya-forma-2612181532056"
|
SCRIPT_URI | "http://new0.pop.com.ua/category/shkolnaya-forma-2612181532056"
|
vhost_id | "1190157"
|
account_id | "154939"
|
SERVER_SIGNATURE | "" |
SERVER_SOFTWARE | "Apache"
|
SERVER_NAME | "new0.pop.com.ua"
|
SERVER_ADDR | "127.0.0.1"
|
SERVER_PORT | "80"
|
REMOTE_ADDR | "54.166.200.255"
|
DOCUMENT_ROOT | "/home/pop00/pop.com.ua/new0/"
|
REQUEST_SCHEME | "http"
|
CONTEXT_PREFIX | "" |
CONTEXT_DOCUMENT_ROOT | "/home/pop00/pop.com.ua/new0/"
|
SERVER_ADMIN | "server@admin.com"
|
SCRIPT_FILENAME | "/home/pop00/pop.com.ua/new0/public/index.php"
|
REMOTE_PORT | "25740"
|
REDIRECT_URL | "/public/category/shkolnaya-forma-2612181532056"
|
REDIRECT_QUERY_STRING | "_url=/category/shkolnaya-forma-2612181532056&page=1"
|
SERVER_PROTOCOL | "HTTP/1.0"
|
REQUEST_METHOD | "GET"
|
QUERY_STRING | "_url=/category/shkolnaya-forma-2612181532056&page=1"
|
REQUEST_URI | "/category/shkolnaya-forma-2612181532056?page=1"
|
SCRIPT_NAME | "/public/index.php"
|
PHP_SELF | "/public/index.php"
|
REQUEST_TIME_FLOAT | 1711714855.6437
|
REQUEST_TIME | 1711714855
|