After adding a accessor to my model, Laravel-admin shows the above error when creating a post.

BadMethodCallException In ForwardsCalls.php line 71 : Call to undefined method App\Models\Post::coverUrl()

First few line of App\Models\Post.php:


namespace App\Models;

use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Post extends Model {
    use HasFactory;

    protedted function coverUrl(): Attribute
        return Attribute::make(
            get: fn ( $value) => str_replace(' ','%20',$value),

I've searched for hours, never finding the same case. Suddenly, this solution just came to my mind, and it worked!
Change protedted function coverUrl(): Attribute to public function coverUrl(): Attribute.