One Hat Cyber Team
Your IP :
18.119.131.79
Server IP :
web.dafriappsdev.com
Server :
Linux server3.shared.spaceship.host 4.18.0-372.9.1.1.lve.el8.x86_64 #1 SMP Tue May 24 07:49:22 EDT 2022 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
rlcugxuggt
/
api.dafriappsdev.com
/
app
/
Models
/
Edit File:
Order.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Order extends Model { use HasFactory; /** * The attributes that are mass assignable. * * @var array<int, string> */ protected $fillable = [ 'invoice_no', ]; protected $casts = [ 'meta' => 'json' ]; protected static function boot() { parent::boot(); static::creating(function ($model) { $model->id = Order::max('id') + 1; $model->invoice_no = str_pad($model->id, 7, '0', STR_PAD_LEFT); }); } public function user() { return $this->belongsTo('App\Models\User'); } public function plan() { return $this->belongsTo('App\Models\Plan'); } public function gateway() { return $this->belongsTo('App\Models\Gateway'); } }
Simpan