Merge pull request #27 from 4xmen/master

fix test
main
A1Gard 8 months ago committed by GitHub
commit 00e49d4274
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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