* @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { // } /** * Display the specified resource. * * @param \App\Section $section * @return \Illuminate\Http\Response */ public function show($slug) { $section = Section::where('slug', $slug)->first(); // Get ids of descendants $sections = $section->descendants()->pluck('id'); //Include the id of category itself $sections[] = $section->getKey(); // Get Ads $ads = Ad::with(['user', 'area', 'first_photo']) ->withCount('comments') ->whereIn('section_id', $sections) ->orderBy('created_at', 'desc') ->limit(16) ->get(); return view('sections.show',['section' => $section, 'ads' => $ads, 'title' => $section->name]); } /** * Show the form for editing the specified resource. * * @param \App\Section $section
"Call to a member function descendants() on null"
Key | Value |
PATH | "/usr/local/bin:/usr/bin:/bin"
|
TEMP | "/tmp"
|
TMP | "/tmp"
|
TMPDIR | "/tmp"
|
PWD | "/"
|
HTTP_ACCEPT | "*/*"
|
CONTENT_LENGTH | "0"
|
HTTP_HOST | "haraj.hyyat.org"
|
HTTP_USER_AGENT | "claudebot"
|
REDIRECT_UNIQUE_ID | "ZgV8U8T_PvsEIO47nlifGAAAABE"
|
REDIRECT_SCRIPT_URL | "/sections/%D9%85%D8%B3%D8%AA%D9%84%D8%B2%D9%85%D8%A7%D8%AA-%D8%AD%D9%84%D8%A7%D9%84"
|
REDIRECT_SCRIPT_URI | "http://haraj.hyyat.org/sections/%D9%85%D8%B3%D8%AA%D9%84%D8%B2%D9%85%D8%A7%D8%AA-%D8%AD%D9%84%D8%A7%D9%84"
|
REDIRECT_STATUS | "200"
|
UNIQUE_ID | "ZgV8U8T_PvsEIO47nlifGAAAABE"
|
SCRIPT_URL | "/sections/%D9%85%D8%B3%D8%AA%D9%84%D8%B2%D9%85%D8%A7%D8%AA-%D8%AD%D9%84%D8%A7%D9%84"
|
SCRIPT_URI | "http://haraj.hyyat.org/sections/%D9%85%D8%B3%D8%AA%D9%84%D8%B2%D9%85%D8%A7%D8%AA-%D8%AD%D9%84%D8%A7%D9%84"
|
SERVER_SIGNATURE | "" |
SERVER_SOFTWARE | "Apache"
|
SERVER_NAME | "haraj.hyyat.org"
|
SERVER_ADDR | "95.216.226.221"
|
SERVER_PORT | "80"
|
REMOTE_ADDR | "174.129.59.198"
|
DOCUMENT_ROOT | "/home/harajhyyat/public_html"
|
REQUEST_SCHEME | "http"
|
CONTEXT_PREFIX | "" |
CONTEXT_DOCUMENT_ROOT | "/home/harajhyyat/public_html"
|
SERVER_ADMIN | "webmaster@haraj.hyyat.org"
|
SCRIPT_FILENAME | "/home/harajhyyat/public_html/index.php"
|
REMOTE_PORT | "36724"
|
REDIRECT_URL | "/sections/%D9%85%D8%B3%D8%AA%D9%84%D8%B2%D9%85%D8%A7%D8%AA-%D8%AD%D9%84%D8%A7%D9%84"
|
SERVER_PROTOCOL | "HTTP/1.1"
|
REQUEST_METHOD | "GET"
|
QUERY_STRING | "" |
REQUEST_URI | "/sections/%25D9%2585%25D8%25B3%25D8%25AA%25D9%2584%25D8%25B2%25D9%2585%25D8%25A7%25D8%25AA-%25D8%25AD%25D9%2584%25D8%25A7%25D9%2584"
|
SCRIPT_NAME | "/index.php"
|
PHP_SELF | "/index.php"
|
REQUEST_TIME_FLOAT | 1711635539.5277
|
REQUEST_TIME | 1711635539
|
APP_NAME | "حلال"
|
APP_ENV | "local"
|
APP_KEY | "base64:73AdMCcC4T05NJsmoKMKuwxNkAQAxxNZHkJeKiXL28g="
|
APP_DEBUG | "true"
|
APP_LOG_LEVEL | "debug"
|
APP_URL | "http://halal.sa.com/"
|
DB_CONNECTION | "mysql"
|
DB_HOST | "127.0.0.1"
|
DB_PORT | "3306"
|
DB_DATABASE | "harajhyy_halal"
|
DB_USERNAME | "harajhyy_halal"
|
DB_PASSWORD | "jb9QC-U~AN_n"
|
BROADCAST_DRIVER | "log"
|
CACHE_DRIVER | "array"
|
SESSION_DRIVER | "file"
|
SESSION_LIFETIME | "120"
|
QUEUE_DRIVER | "sync"
|
REDIS_HOST | "127.0.0.1"
|
REDIS_PASSWORD | "null"
|
REDIS_PORT | "6379"
|
MAIL_DRIVER | "smtp"
|
MAIL_HOST | "haraj.hyyat.org"
|
MAIL_PORT | "465"
|
MAIL_USERNAME | "harajhyyat"
|
MAIL_PASSWORD | "f(H6&80*ra!T"
|
MAIL_ENCRYPTION | "ssl"
|
PUSHER_APP_ID | "" |
PUSHER_APP_KEY | "" |
PUSHER_APP_SECRET | "" |
PUSHER_APP_CLUSTER | "mt1"
|
Key | Value |
PATH | "/usr/local/bin:/usr/bin:/bin"
|
TEMP | "/tmp"
|
TMP | "/tmp"
|
TMPDIR | "/tmp"
|
PWD | "/"
|
APP_NAME | "حلال"
|
APP_ENV | "local"
|
APP_KEY | "base64:73AdMCcC4T05NJsmoKMKuwxNkAQAxxNZHkJeKiXL28g="
|
APP_DEBUG | "true"
|
APP_LOG_LEVEL | "debug"
|
APP_URL | "http://halal.sa.com/"
|
DB_CONNECTION | "mysql"
|
DB_HOST | "127.0.0.1"
|
DB_PORT | "3306"
|
DB_DATABASE | "harajhyy_halal"
|
DB_USERNAME | "harajhyy_halal"
|
DB_PASSWORD | "jb9QC-U~AN_n"
|
BROADCAST_DRIVER | "log"
|
CACHE_DRIVER | "array"
|
SESSION_DRIVER | "file"
|
SESSION_LIFETIME | "120"
|
QUEUE_DRIVER | "sync"
|
REDIS_HOST | "127.0.0.1"
|
REDIS_PASSWORD | "null"
|
REDIS_PORT | "6379"
|
MAIL_DRIVER | "smtp"
|
MAIL_HOST | "haraj.hyyat.org"
|
MAIL_PORT | "465"
|
MAIL_USERNAME | "harajhyyat"
|
MAIL_PASSWORD | "f(H6&80*ra!T"
|
MAIL_ENCRYPTION | "ssl"
|
PUSHER_APP_ID | "" |
PUSHER_APP_KEY | "" |
PUSHER_APP_SECRET | "" |
PUSHER_APP_CLUSTER | "mt1"
|