芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/design.pulsehost.co.uk/application/app/Models/Payment.php
belongsTo('App\Models\User', 'payment_creatorid', 'id'); } /** * relatioship business rules: * - the Invoice can have many Payments * - the Payments belongs to one Invoice */ public function invoice() { return $this->belongsTo('App\Models\Invoice', 'payment_invoiceid', 'bill_invoiceid'); } /** * relatioship business rules: * - the Client can have many Payments * - the Payments belongs to one Client */ public function client() { return $this->belongsTo('App\Models\Client', 'payment_clientid', 'client_id'); } /** * relatioship business rules: * - the Project can have many Payments * - the Payments belongs to one Project */ public function project() { return $this->belongsTo('App\Models\Project', 'payment_projectid', 'project_id'); } /** * display format for invoice id - adding leading zeros & with any set prefix * e.g. INV-000001 */ public function getFormattedInvoiceIdAttribute() { return runtimeInvoiceIdFormat($this->payment_invoiceid); } }