Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function getblog() on null Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Call to a member function getblog() on null" Stacktrace: #0 Symfony\Component\Debug\Exception\FatalThrowableError in /home/dacovn/frameworks/app/Http/Controllers/TypeController.php:25
Application frames (1) All frames (1)
0
Symfony
\
Component
\
Debug
\
Exception
\
FatalThrowableError
/
app
/
Http
/
Controllers
/
TypeController.php
25
/
home
/
dacovn
/
frameworks
/
app
/
Http
/
Controllers
/
TypeController.php
use App\Http\Requests\TypeUpdateRequest;
use Illuminate\Http\Request;
use Illuminate\Support\MessageBag;
use App\Http\Controllers\Controller;
use App\Models\Type;
use Illuminate\Support\Facades\View;
use Auth;
 
class TypeController extends Controller
{
    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        $type = Type::where('published', 1)->where('slug', $id)->where('published', 1)->first();
        $blogs = $type->getblog()->where('published', 1)->orderBy('order', 'DESC')->paginate(7);
        if (empty($type)) {
            return redirect(route('home'))->with('error', 'Catalog is invalid, please try again.');
        }
        if(!empty($type->page) )
        {
            View::share('webname', $type->page);
        }
        else
        {
            View::share('webname', $type->title);
        }
        if(!empty($type->en_page))
        {
            View::share('en_webname', $type->en_page);
        }
        else
        {
            if(!empty($type->en_title))
            {
                View::share('en_webname', $type->en_title);
Arguments
  1. "Call to a member function getblog() on null"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
PATH
"/usr/local/bin:/bin:/usr/bin"
HTTP_ACCEPT
"*/*"
HTTP_HOST
"daco.vn"
HTTP_REFERER
"http://daco.vn/muc-tin/wwwwwwwwww-2"
HTTP_USER_AGENT
"claudebot"
DOCUMENT_ROOT
"/home/dacovn/public_html"
REMOTE_ADDR
"35.168.113.41"
REMOTE_PORT
"38278"
SERVER_ADDR
"210.245.90.240"
SERVER_NAME
"daco.vn"
SERVER_ADMIN
"webmaster@daco.vn"
SERVER_PORT
"443"
REQUEST_SCHEME
"https"
REQUEST_URI
"/muc-tin/wwwwwwwwww-2"
REDIRECT_URL
"/muc-tin/wwwwwwwwww-2"
REDIRECT_REQUEST_METHOD
"GET"
HTTPS
"on"
REDIRECT_STATUS
"200"
X_SPDY
"HTTP2"
SSL_PROTOCOL
"TLSv1.3"
SSL_CIPHER
"TLS_AES_256_GCM_SHA384"
SSL_CIPHER_USEKEYSIZE
"256"
SSL_CIPHER_ALGKEYSIZE
"256"
SCRIPT_FILENAME
"/home/dacovn/public_html/index.php"
QUERY_STRING
""
SCRIPT_URI
"https://daco.vn/muc-tin/wwwwwwwwww-2"
SCRIPT_URL
"/muc-tin/wwwwwwwwww-2"
SCRIPT_NAME
"/index.php"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_SOFTWARE
"LiteSpeed"
REQUEST_METHOD
"GET"
X-LSCACHE
"on,crawler"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1710818206.1435
REQUEST_TIME
1710818206
APP_NAME
""
APP_ENV
"local"
APP_KEY
"base64:dPcx+lRVetCz0bA/mnONV9AN2PFS/fBo6S8cWnDBd5o="
APP_DEBUG
"true"
APP_URL
""
LOG_CHANNEL
"stack"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3306"
DB_DATABASE
"dacovn_db"
DB_USERNAME
"dacovn_db"
DB_PASSWORD
"dacodb1123##"
BROADCAST_DRIVER
"log"
CACHE_DRIVER
"file"
SESSION_DRIVER
"file"
SESSION_LIFETIME
"1440"
QUEUE_DRIVER
"sync"
REDIS_HOST
"127.0.0.1"
REDIS_PASSWORD
"null"
REDIS_PORT
"6379"
MAIL_DRIVER
"smtp"
MAIL_HOST
"ssl://smtp.gmail.com"
MAIL_PORT
"465"
MAIL_USERNAME
"dacokinhdoanh@gmail.com"
MAIL_PASSWORD
"Daco@3456"
MAIL_ENCRYPTION
"null"
PUSHER_APP_ID
""
PUSHER_APP_KEY
""
PUSHER_APP_SECRET
""
PUSHER_APP_CLUSTER
"mt1"
MIX_PUSHER_APP_KEY
""
MIX_PUSHER_APP_CLUSTER
"mt1"
Key Value
PATH
"/usr/local/bin:/bin:/usr/bin"
APP_NAME
""
APP_ENV
"local"
APP_KEY
"base64:dPcx+lRVetCz0bA/mnONV9AN2PFS/fBo6S8cWnDBd5o="
APP_DEBUG
"true"
APP_URL
""
LOG_CHANNEL
"stack"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3306"
DB_DATABASE
"dacovn_db"
DB_USERNAME
"dacovn_db"
DB_PASSWORD
"dacodb1123##"
BROADCAST_DRIVER
"log"
CACHE_DRIVER
"file"
SESSION_DRIVER
"file"
SESSION_LIFETIME
"1440"
QUEUE_DRIVER
"sync"
REDIS_HOST
"127.0.0.1"
REDIS_PASSWORD
"null"
REDIS_PORT
"6379"
MAIL_DRIVER
"smtp"
MAIL_HOST
"ssl://smtp.gmail.com"
MAIL_PORT
"465"
MAIL_USERNAME
"dacokinhdoanh@gmail.com"
MAIL_PASSWORD
"Daco@3456"
MAIL_ENCRYPTION
"null"
PUSHER_APP_ID
""
PUSHER_APP_KEY
""
PUSHER_APP_SECRET
""
PUSHER_APP_CLUSTER
"mt1"
MIX_PUSHER_APP_KEY
""
MIX_PUSHER_APP_CLUSTER
"mt1"
0. Whoops\Handler\PrettyPageHandler