laravel 8

This commit is contained in:
Denis Duliçi
2020-10-14 17:07:59 +03:00
parent b4e044b199
commit 1ba8835a2d
134 changed files with 3515 additions and 1952 deletions

View File

@ -4,10 +4,11 @@ namespace App\Models\Setting;
use App\Abstracts\Model;
use App\Traits\Transactions;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Category extends Model
{
use Transactions;
use HasFactory, Transactions;
protected $table = 'categories';
@ -130,4 +131,14 @@ class Category extends Model
{
return (int) $query->other()->pluck('id')->first();
}
/**
* Create a new factory instance for the model.
*
* @return \Illuminate\Database\Eloquent\Factories\Factory
*/
protected static function newFactory()
{
return \Database\Factories\Category::new();
}
}

View File

@ -5,10 +5,11 @@ namespace App\Models\Setting;
use App\Abstracts\Model;
use App\Traits\Contacts;
use App\Traits\Transactions;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Currency extends Model
{
use Contacts, Transactions;
use Contacts, HasFactory, Transactions;
protected $table = 'currencies';
@ -163,4 +164,14 @@ class Currency extends Model
{
return $query->where($this->table . '.code', $code);
}
/**
* Create a new factory instance for the model.
*
* @return \Illuminate\Database\Eloquent\Factories\Factory
*/
protected static function newFactory()
{
return \Database\Factories\Currency::new();
}
}

View File

@ -3,9 +3,12 @@
namespace App\Models\Setting;
use App\Abstracts\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Tax extends Model
{
use HasFactory;
protected $table = 'taxes';
/**
@ -127,4 +130,14 @@ class Tax extends Model
return $title;
}
/**
* Create a new factory instance for the model.
*
* @return \Illuminate\Database\Eloquent\Factories\Factory
*/
protected static function newFactory()
{
return \Database\Factories\Tax::new();
}
}