src/Traits/NotableTrait.php
public static function updateNote(
        int $object_id, int $note_id, string $title = null, string $note = null)
    {

        $note_record = Note::where('object_type', __CLASS__)
            ->where('object_id', $object_id)
            ->where('id', $note_id)
            ->first();

        if (! is_null($title))
            $note_record->title = $title;

        if (! is_null($note))
            $note_record->note = $note;

        $note_record->save();

    }
public static function updateNote(
        int $object_id, int $note_id, string $title = null, string $note = null)
    {

        $note_record = Note::where('object_type', __CLASS__)
            ->where('object_id', $object_id)
            ->where('id', $note_id)
            ->first();

        if (! is_null($title))
            $note_record->title = $title;

        if (! is_null($note))
            $note_record->note = $note;

        $note_record->save();

    }
public static function updateNote ( int $ object_id , int $ note_id , string $ title = null , string $ note = null ) { $ note_record = Note :: where ( 'object_type' , __CLASS__ ) -> where ( 'object_id' , $ object_id ) -> where ( 'id' , $ note_id ) -> first ( ) ; if ( ! is_null ( $ title ) ) $ note_record -> title = $ title ; if ( ! is_null ( $ note ) ) $ note_record -> note = $ note ; $ note_record -> save ( ) ; }
Update a single note with a new title or note.

@param int         $object_id
@param int         $note_id
@param string|null $title
@param string|null $note
Update a single note with a new title or note .