Work in progress, initial dashboard

This commit is contained in:
Deon George
2018-06-05 21:13:57 +10:00
parent feda44db8a
commit c6342abdc2
31 changed files with 17024 additions and 385 deletions

View File

@@ -0,0 +1,10 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ProductType extends Model
{
//
}

View File

@@ -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
View File

@@ -0,0 +1,10 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Supplier extends Model
{
//
}

View File

@@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class SupplierProduct extends Model
{
//
}

View File

@@ -0,0 +1,10 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SupplierProductType extends Model
{
//
}