{"record":{"id":"bc9d73164070b1e5","repo":"z-song/laravel-admin","slug":"invalid-model-this-model","errorCode":null,"errorMessage":"Invalid model [{$this->model}]","messagePattern":"Invalid model \\[(.+?)\\]","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Grid/Selectable.php","lineNumber":145,"sourceCode":"\n    protected function appendRemoveBtn($hide = true)\n    {\n        $hide = $hide ? 'hide' : '';\n        $key = $this->key;\n\n        $this->column('__remove__', ' ')->display(function () use ($hide, $key) {\n            return <<<BTN\n<a href=\"javascript:void(0);\" class=\"grid-row-remove {$hide}\" data-key=\"{$this->getAttribute($key)}\">\n    <i class=\"fa fa-trash\"></i>\n</a>\nBTN;\n        });\n    }\n\n    protected function initGrid()\n    {\n        if (!class_exists($this->model) || !is_subclass_of($this->model, Model::class)) {\n            throw new \\InvalidArgumentException(\"Invalid model [{$this->model}]\");\n        }\n\n        /** @var Model $model */\n        $model = new $this->model();\n\n        $this->grid = new Grid(new $model());\n\n        if (!$this->key) {\n            $this->key = $model->getKeyName();\n        }\n    }\n\n    /**\n     * @param string $method\n     * @param array  $arguments\n     *\n     * @return mixed\n     */","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/z-song/laravel-admin/blob/67c441eb78ecc5437e59775d89770cd9c2cb1e05/src/Grid/Selectable.php#L127-L163","documentation":"Error \"Invalid model [{$this->model}]\" thrown in z-song/laravel-admin.","triggerScenarios":"Thrown at src/Grid/Selectable.php:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"67c441eb78ecc5437e59775d89770cd9c2cb1e05","analyzedAt":"2026-08-21T02:51:03.143Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}