Subiendo proyecto completo sin restricciones de git ignore

This commit is contained in:
Jose Sanchez
2023-08-17 11:44:02 -04:00
parent a0d4f5ba3b
commit 20f1c60600
19921 changed files with 2509159 additions and 45 deletions

View File

@@ -0,0 +1,10 @@
<?php
namespace SebaCarrasco93\LaravelPayku\Models;
use Illuminate\Database\Eloquent\Model;
class PaykuPayment extends Model
{
protected $guarded = [];
}

View File

@@ -0,0 +1,43 @@
<?php
namespace SebaCarrasco93\LaravelPayku\Models;
use Illuminate\Database\Eloquent\Model;
class PaykuTransaction extends Model
{
protected $guarded = [];
public $incrementing = false;
public function payment()
{
return $this->hasOne(PaykuPayment::class, 'transaction_id');
}
public function scopeRegister($query)
{
$query->where('status', 'register');
}
public function scopeSuccess($query)
{
$query->where('status', 'success');
}
public function scopePending($query)
{
$query->where('status', 'pending');
}
public function markAsNotified()
{
return $this->update(['notified_at' => now()]);
}
public function notifyForFirstTime()
{
if (! $this->notified_at) {
return $this->markAsNotified();
}
}
}