Work in progress, initial dashboard
This commit is contained in:
10
app/Models/ProductType.php
Normal file
10
app/Models/ProductType.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ProductType extends Model
|
||||
{
|
||||
//
|
||||
}
|
@@ -35,6 +35,16 @@ class Service extends Model
|
||||
return $this->belongsTo(Product::class);
|
||||
}
|
||||
|
||||
public function getCategoryAttribute()
|
||||
{
|
||||
return $this->product->prod_plugin_file;
|
||||
}
|
||||
|
||||
public function getNextInvoiceAttribute()
|
||||
{
|
||||
return $this->date_next_invoice->format('Y-m-d');
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will return the associated service model for the product type
|
||||
*/
|
||||
@@ -55,11 +65,6 @@ class Service extends Model
|
||||
return 'TBA';
|
||||
}
|
||||
|
||||
public function getNextInvoiceAttribute()
|
||||
{
|
||||
return $this->date_next_invoice->format('Y-m-d');
|
||||
}
|
||||
|
||||
public function getServiceNameAttribute()
|
||||
{
|
||||
if (! isset($this->getServiceDetail()->name)) dd($this,$this->product,$this->getServiceDetail());
|
||||
|
10
app/Models/Supplier.php
Normal file
10
app/Models/Supplier.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Supplier extends Model
|
||||
{
|
||||
//
|
||||
}
|
10
app/Models/SupplierProduct.php
Normal file
10
app/Models/SupplierProduct.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SupplierProduct extends Model
|
||||
{
|
||||
//
|
||||
}
|
10
app/Models/SupplierProductType.php
Normal file
10
app/Models/SupplierProductType.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SupplierProductType extends Model
|
||||
{
|
||||
//
|
||||
}
|
Reference in New Issue
Block a user