Implementation of areafix processing, first subscribe/unsubscribe with scan
This commit is contained in:
@@ -569,6 +569,7 @@ class Address extends Model
|
||||
public function echoareas()
|
||||
{
|
||||
return $this->belongsToMany(Echoarea::class)
|
||||
->using(AddressEchoarea::class)
|
||||
->orderBy('name')
|
||||
->withPivot(['subscribed']);
|
||||
}
|
||||
|
12
app/Models/AddressEchoarea.php
Normal file
12
app/Models/AddressEchoarea.php
Normal 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',
|
||||
];
|
||||
}
|
@@ -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 */
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user