register step
This commit is contained in:
parent
1ada368ed4
commit
f06d2d15a5
50 changed files with 748 additions and 276 deletions
|
|
@ -176,11 +176,16 @@ class UserAccount extends Model
|
|||
$this->attributes['birthday'] = isset($value) ? (new Carbon($value))->format('Y-m-d') : NULL;
|
||||
}
|
||||
|
||||
public function getDataProtectionFormat(){
|
||||
public function getDataProtectionFormat(){
|
||||
if(!$this->attributes['data_protection']){ return ""; }
|
||||
return Carbon::parse($this->attributes['data_protection'])->format(\Util::formatDateTimeDB());
|
||||
}
|
||||
|
||||
public function getAcceptContractFormat(){
|
||||
if(!$this->attributes['accept_contract']){ return ""; }
|
||||
return Carbon::parse($this->attributes['accept_contract'])->format(\Util::formatDateTimeDB());
|
||||
}
|
||||
|
||||
|
||||
public function getCountryAttrAs($attr, $as = false){
|
||||
if($this->country){
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ class UserHistory extends Model
|
|||
protected $table = 'user_histories';
|
||||
|
||||
protected $status_types = [
|
||||
0 => 'info',
|
||||
1 => 'store_payment',
|
||||
2 => 'checkout_payment',
|
||||
3 => 'payment_error',
|
||||
|
|
@ -63,6 +64,7 @@ class UserHistory extends Model
|
|||
50 => 'delete_membership'
|
||||
];
|
||||
protected $status_colors = [
|
||||
0 => 'info',
|
||||
1 => 'warning',
|
||||
2 => 'warning',
|
||||
3 => 'danger',
|
||||
|
|
|
|||
69
app/Models/UserMessage.php
Normal file
69
app/Models/UserMessage.php
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class UserMessage
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $send_user_id
|
||||
* @property string $email
|
||||
* @property string $subject
|
||||
* @property string $message
|
||||
* @property bool $send
|
||||
* @property bool $fail
|
||||
* @property string $error
|
||||
* @property Carbon $sent_at
|
||||
* @property Carbon $scheduled_at
|
||||
* @property Carbon $delivered_at
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @property User $user
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class UserMessage extends Model
|
||||
{
|
||||
protected $table = 'user_messages';
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'send_user_id' => 'int',
|
||||
'send' => 'bool',
|
||||
'fail' => 'bool'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'sent_at',
|
||||
'scheduled_at',
|
||||
'delivered_at'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'send_user_id',
|
||||
'email',
|
||||
'subject',
|
||||
'message',
|
||||
'send',
|
||||
'fail',
|
||||
'error',
|
||||
'sent_at',
|
||||
'scheduled_at',
|
||||
'delivered_at'
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue