17 Nov - Static Sites to laravel
This commit is contained in:
parent
610aa1e202
commit
5ff57a21a7
3661 changed files with 569001 additions and 771 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
|
|
@ -32,12 +33,24 @@ use Illuminate\Database\Eloquent\Model;
|
|||
*/
|
||||
class ProductImage extends Model
|
||||
{
|
||||
use Sluggable;
|
||||
|
||||
|
||||
protected $table = 'product_images';
|
||||
|
||||
protected $fillable = [
|
||||
'product_id', 'filename', 'original_name', 'ext', 'mine', 'size'
|
||||
];
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'original_name'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function product()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue