Skip to content

Overriding Trait Propertie $lock is forbidden  #5

@delmicio

Description

@delmicio

Hi, I was just following your example to disable optimistic locking by default on a model class but a fatal error is thrown.

PHP Fatal error:  App\Models\LiveClass and Reshadman\OptimisticLocking\OptimisticLocking define the same property ($lock) in the composition of App\Models\LiveClass. However, the definition differs and is considered incompatible.

I've followed you documented example:

<?php
class BlogPost extends \Illuminate\Database\Eloquent\Model 
{
    use \Reshadman\OptimisticLocking\OptimisticLocking;
    
    protected $lock = false;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions