Level 122
please include your code and put three backticks ``` on a line before and after
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a model that throws the above error. I created a seeder for this model that doesn't seem to run (other seeders in the folder run). The model is below..
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Perms extends Model
{
protected $fillable = ['name'];
public function roles() {
return $this->belongsToMany(Role::class,'roles_permissions');
}
}
in tinker I do..
$p = new \App\Perms();
$p->name = 'test';
$p->save();
PHP Error: Call to undefined method stdClass::save()
Please or to participate in this conversation.