pull/27/head
A1Gard 1 year ago
parent 1794d1853a
commit 3c07b560ac

@ -65,7 +65,7 @@ class WebsiteController extends Controller
// $vid = Clip::latest()->where('active', 1)->first();
$discount = Discount::whereNotNull('expire')
->where('expire', '>', \DB::raw('NOW()'))
->where('expire', '>', date('Y-m-d'))
->whereNotNull('product_id')->pluck('product_id')->toArray();
$disPros = Product::whereIn('id', $discount)->get();

@ -300,7 +300,7 @@ class Product extends Model implements HasMedia
function hasDiscount()
{
return $this->discounts()->where('expire', '>', \DB::raw('NOW()'))->count() > 0;
return $this->discounts()->where('expire', '>', date('Y-m-d'))->count() > 0;
}
public function isFav()

@ -208,7 +208,7 @@ class AdminWebPagesTest extends TestCase
$response->assertStatus(200);
if (Customer::count() != 0){
$response = $this->actingAs($user)->get(route('admin.customer.edit',Customer::first()->slug));
$response = $this->actingAs($user)->get(route('admin.customer.edit',Customer::first()->id));
$response->assertStatus(200);
}

Loading…
Cancel
Save