⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
hospital.dev-unit.com
/
app
/
Models
/
View File Name :
InvoiceItem.php
<?php namespace App\Models; use Eloquent as Model; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Support\Carbon; /** * Class InvoiceItem * * @version February 24, 2020, 5:57 am UTC * * @property int $id * @property int $account_id * @property int $invoice_id * @property string $description * @property int $quantity * @property float $price * @property float $total * @property Carbon|null $created_at * @property Carbon|null $updated_at * * @method static Builder|InvoiceItem newModelQuery() * @method static Builder|InvoiceItem newQuery() * @method static Builder|InvoiceItem query() * @method static Builder|InvoiceItem whereAccountId($value) * @method static Builder|InvoiceItem whereCreatedAt($value) * @method static Builder|InvoiceItem whereDescription($value) * @method static Builder|InvoiceItem whereId($value) * @method static Builder|InvoiceItem whereInvoiceId($value) * @method static Builder|InvoiceItem wherePrice($value) * @method static Builder|InvoiceItem whereQuantity($value) * @method static Builder|InvoiceItem whereTotal($value) * @method static Builder|InvoiceItem whereUpdatedAt($value) * * @mixin Model * * @property-read Account $account * @property int $is_default * * @method static Builder|InvoiceItem whereIsDefault($value) */ class InvoiceItem extends Model { /** * Validation rules * * @var array */ public static $rules = [ 'account_id' => 'required|integer', 'quantity' => 'required|integer', 'price' => 'required|regex:/^\d+(\.\d{1,2})?$/', ]; public $table = 'invoice_items'; public $fillable = [ 'account_id', 'description', 'quantity', 'price', 'total', ]; /** * Get the attributes that should be cast. * * @return array<string, string> */ protected function casts(): array { return [ 'id' => 'integer', 'account_id' => 'integer', 'description' => 'string', 'quantity' => 'integer', 'price' => 'double', 'total' => 'double', ]; } public function account(): BelongsTo { return $this->belongsTo(Account::class); } }