Your Shop creates, verify user
This commit is contained in:
parent
c129a44383
commit
ccc2af4bf7
76 changed files with 3728 additions and 1477 deletions
|
|
@ -74,6 +74,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @property string|null $slug
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product findSimilarSlugs($attribute, $config, $slug)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product query()
|
||||
*/
|
||||
class Product extends Model
|
||||
{
|
||||
|
|
@ -134,34 +137,6 @@ class Product extends Model
|
|||
return $this->hasMany('App\Models\ProductImage', 'product_id', 'id');
|
||||
}
|
||||
|
||||
/*
|
||||
public function isImageAfter(){
|
||||
if(empty($this->attributes['filename_after']) || @$this->attributes['filename_after'] == null || @$this->attributes['filename_after'] == ""){
|
||||
return false;
|
||||
}
|
||||
if(!\Storage::disk('public')->has('images/'.$this->id.'/'.$this->filename_after)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function getImage($file){
|
||||
|
||||
if($file == "before" && $this->isImageBefore()){
|
||||
$link = 'images/'.$this->id.'/'.$this->filename_before;
|
||||
return '/storage/'.$link.'?=lm='.\Storage::disk('public')->lastModified($link);
|
||||
}
|
||||
|
||||
if($file == "after" && $this->isImageAfter()){
|
||||
$link = 'images/'.$this->id.'/'.$this->filename_after;
|
||||
return '/storage/'.$link.'?=lm='.\Storage::disk('public')->lastModified($link);
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
public function _format_number($value){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue