Implementation of areafix processing, first subscribe/unsubscribe with scan

This commit is contained in:
2024-10-31 22:40:58 +11:00
parent d792bf8fe3
commit 4796dd9a6e
11 changed files with 1133 additions and 745 deletions

View File

@@ -569,6 +569,7 @@ class Address extends Model
public function echoareas()
{
return $this->belongsToMany(Echoarea::class)
->using(AddressEchoarea::class)
->orderBy('name')
->withPivot(['subscribed']);
}

View File

@@ -0,0 +1,12 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\Pivot;
class AddressEchoarea extends Pivot
{
protected $casts = [
'subscribed' => 'datetime:Y-m-d H:i',
];
}

View File

@@ -277,6 +277,16 @@ final class Netmail extends Model implements Packet
: $this->getRelationValue('path');
}
/**
* Split the body of a message into a collection of lines.
*
* @return array
*/
public function getBodyLinesAttribute(): array
{
return explode("\r",$this->msg_src);
}
/* METHODS */
/**