Rename Admin views directory, add some functions on models
This commit is contained in:
16
app/Models/Core/Comment.php
Normal file
16
app/Models/Core/Comment.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Core;
|
||||
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
use Venturecraft\Revisionable\RevisionableTrait;
|
||||
use Wildside\Userstamps\Userstamps;
|
||||
|
||||
use BeyondCode\Comments\Comment as parentComment;
|
||||
|
||||
class Comment extends parentComment
|
||||
{
|
||||
use SoftDeletes, Userstamps;
|
||||
|
||||
}
|
||||
@@ -11,6 +11,7 @@ use Spatie\MediaLibrary\HasMedia;
|
||||
use Spatie\MediaLibrary\InteractsWithMedia;
|
||||
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
||||
|
||||
use BeyondCode\Comments\Traits\HasComments;
|
||||
use Rinvex\Categories\Traits\Categorizable;
|
||||
use Rinvex\Tags\Traits\Taggable;
|
||||
use Fico7489\Laravel\EloquentJoin\Traits\EloquentJoin;
|
||||
@@ -18,7 +19,7 @@ use Wildside\Userstamps\Userstamps;
|
||||
|
||||
class Article extends Model implements HasMedia
|
||||
{
|
||||
use Categorizable, EloquentJoin, InteractsWithMedia, Taggable, SoftDeletes, UserStamps;
|
||||
use Categorizable, EloquentJoin, HasComments, InteractsWithMedia, Taggable, SoftDeletes, UserStamps;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
protected $table = 'shop_articles';
|
||||
|
||||
@@ -4,8 +4,11 @@ namespace App\Models\Shop;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use BeyondCode\Comments\Traits\HasComments;
|
||||
class Offer extends Model
|
||||
{
|
||||
use HasComments;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
protected $table = 'shop_offers';
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
namespace App\Models\Shop;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use BeyondCode\Comments\Traits\HasComments;
|
||||
use Znck\Eloquent\Traits\BelongsToThrough;
|
||||
|
||||
class PriceList extends Model
|
||||
{
|
||||
use BelongsToThrough;
|
||||
use BelongsToThrough, HasComments;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
protected $table = 'shop_price_lists';
|
||||
|
||||
@@ -5,10 +5,10 @@ namespace App\Models\Shop;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||
|
||||
use BeyondCode\Comments\Traits\HasComments;
|
||||
class Tariff extends Model
|
||||
{
|
||||
use HasRelationships;
|
||||
use HasComments, HasRelationships;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
protected $table = 'shop_tariffs';
|
||||
|
||||
@@ -4,8 +4,11 @@ namespace App\Models\Shop;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use BeyondCode\Comments\Traits\HasComments;
|
||||
class Variation extends Model
|
||||
{
|
||||
use HasComments;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
protected $table = 'shop_variations';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user