Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image path in model are updated #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class Cart extends Model
{
protected $location = '/Images/Products/';
protected $location = 'http://localhost/Foods-Ecommerce/public/Images/Products/';

public function getImageAttribute($image)
{
Expand Down
2 changes: 1 addition & 1 deletion app/Gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Gallery extends Model
{
//
protected $fillable = ['title','image'];
protected $location = '/Images/Gallery/';
protected $location = 'http://localhost/Foods-Ecommerce/public/Images/Gallery/';
public function getImageAttribute($image){
return $this->location.$image;
}
Expand Down
2 changes: 1 addition & 1 deletion app/HappyCustomer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class HappyCustomer extends Model
'photo',
'about',
];
protected $location = "/Images/Customers/";
protected $location = "http://localhost/Foods-Ecommerce/public/Images/Customers/";

public function getPhotoAttribute($photo){
return $this->location.$photo;
Expand Down
2 changes: 1 addition & 1 deletion app/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Order extends Model
{
protected $fillable = ['user_id','phone','address','note','total','shipping_status'];

protected $location = '/Images/Products/';
protected $location = 'http://localhost/Foods-Ecommerce/public/Images/Products/';

public function getImageAttribute($image){
return $this->location.$image;
Expand Down
2 changes: 1 addition & 1 deletion app/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Product extends Model
],*/
];

protected $location = '/Images/Products/';
protected $location = 'http://localhost/Foods-Ecommerce/public/Images/Products/';

public function getImageAttribute($image){
return $this->location.$image;
Expand Down
2 changes: 1 addition & 1 deletion app/Slider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class Slider extends Model
{
//
protected $path = '/Images/Slider/';
protected $path = 'http://localhost/Foods-Ecommerce/public/Images/Slider/';
protected $fillable = [
'image',
];
Expand Down
2 changes: 1 addition & 1 deletion app/TeamMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TeamMember extends Model
'photo',
'about',
];
protected $location = "/Images/Members/";
protected $location = "http://localhost/Foods-Ecommerce/public/Images/Members/";

public function getPhotoAttribute($photo){
return $this->location.$photo;
Expand Down
2 changes: 1 addition & 1 deletion app/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class User extends Authenticatable
protected $hidden = [
'password', 'remember_token',
];
protected $location = '/UserImage/';
protected $location = 'http://localhost/Foods-Ecommerce/public/UserImage/';

public function getImageAttribute($image){
if($image){
Expand Down
2 changes: 1 addition & 1 deletion app/infos.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class infos extends Model
//
protected $fillable = ['name','address','phone','email','logo','about'];

protected $location = '/Images/logo/';
protected $location = 'http://localhost/Foods-Ecommerce/public/Images/logo/';

public function getLogoAttribute($image){
return $this->location.$image;
Expand Down