Browse AI Field GuideForum Podcast
All ThreadsLeaderboard
  1. Discussions

    1. Popular This Week
    2. Popular All Time
    3. Solved
    4. Unsolved
    5. No Replies Yet

Saneesh's avatar

After executing the tests tables are removed

Hello, I'm using sqlite for Laravel application and PHPUnit. After executing the tests the tables are removed from sqlite even though it was created :memory: for tests. So that I'm not able to login to the application with the registered user. Note: I have used use DatabaseMigrations; statement in each test classes. Detailed issue: https://stackoverflow.com/questions/60887625/

Saneesh's avatar
Saneesh's avatar Saneesh6yrs agoLaravel
12
1
Last reply by Saneesh 6yrs ago
phpfalcon's avatar

Elqouent model array

Inspired by caleb sushi package I made laravel-kabsa with a little diffrence it doesn't make a sqlite database in the memory instead it create new collection checkout here https://github.com/awssat/laravel-kabsa

phpfalcon's avatar
phpfalcon's avatar phpfalcon6yrs agoTips
0
1
tills98's avatar

Laravel 7 Default database connection invalid

At the beginning of developing i've problems with selecting rows in database tables that are not found by larave with DB::query('select * from mytable'); or DB::table('mytable')->select('*')->get(); I have found out through unit tests that laravel uses sqlite as default database connection instead of mysql. My settings in .env file are not imported correctly into conf/d

tills98's avatar
tills98's avatar Sti3bas6yrs agoLaravel
1
1
Last reply by Sti3bas 6yrs ago
Armandisimo's avatar

How use sqlite3 for my testings in windows 7

This is my setup so far: .env DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=payforu DB_USERNAME=root DB_PASSWORD= phpunit.xml <php> <server name="APP_ENV" value="testing"/> <server name="BCRYPT_ROUNDS" value="4"/> <server name="CACHE_DRIVER" value="array"/> <

Armandisimo's avatar
Armandisimo's avatar Armandisim...6yrs agoTesting
4
1
Last reply by Armandisimo 6yrs ago
bwrigley's avatar

Eloquentish for next autoincrement ID?

Hello, I have a Profile model that has a few fields which are indexable and therefore cannot be null and must be unique. So I'm auto-generating them at first save (can be edited later). In Profile model: public function getNextId() { $query = DB::select("show table status like 'profiles'"); return $query[0]->Auto_increment; } In Profil

bwrigley's avatar
bwrigley's avatar click6yrs agoEloquent
10
1
Last reply by click 6yrs ago
jgravois's avatar

No Such Table

I use an sqlite database in memory for testing (set in my phpunit.xml file). I verify that I have a migration for my invoices table. <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateInvoicesTable extends Migration { public function up() { if (Schema::hasTable('in

jgravois's avatar
jgravois's avatar Sinnbeck6yrs agoTesting
2
1
Last reply by Sinnbeck 6yrs ago
TollerHovler's avatar

Tests breaks but app starts working when running "config:cache"

Hello! I am unsure where I am doing wrong here and would appreciate any help. I have been all around the internet not finding any reason it should be this hard to get working. I realize I must've missed some obvious detail somewhere but I can't find it. The problem: First, I run my tests. They all succeed and everything looks well. I open my browser and look at my application,

TollerHovler's avatar
TollerHovler's avatar TollerHovl...6yrs agoTesting
28
1
Last reply by TollerHovler 6yrs ago
ArneDB's avatar

Laravel Dusk: Running one test at a time works, but when running two tests or more a PDOException is thrown

Hello there, I have a few dusk tests, they're slow high level tests, they give me alot of comfort! :D I can run every single one of these tests in isoloation with --filter, but when I just run php artisan dusk, the first test works, but after that the tests generate SQLSTATE[HY000]: General error: 10 disk I/O error There's always another SQL error, here's some examples: (SQL: a

ArneDB's avatar
ArneDB's avatar ArneDB6yrs agoTesting
2
1
Last reply by ArneDB 6yrs ago
uksarkar's avatar

How to create new database for every session

I have a Laravel project and I want to create a demo view for user. So, I want to generate new database with some default data for every logged-in user and destroy the database after completed the session. My idea to create new SQLite database for every user and destroy it after the session is completed. Now how can I implement to new SQLite database when a user logged-in?

uksarkar's avatar
uksarkar's avatar bobbybouwm...6yrs agoLaravel
6
1
Last reply by bobbybouwmann 6yrs ago
deshiloh's avatar

Deploy with Github workflow

Hi ! I'm started to take a look using CI/CD. i having a private repo to github and would like to create a workflow to testing before deploy. i tried like this : name: Laravel on: [push] jobs: laravel-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Copy .env run: php -r "file_exists('.env') || copy('.env.example', '.env');

deshiloh's avatar
deshiloh's avatar deshiloh6yrs agoEnvoyer
3
1
Last reply by deshiloh 6yrs ago
shariff's avatar

unable to login in laravel using LDAP package Adldap2-Laravel

Hi I am using the Adldap2-Laravel package for authentication. I am testing using the LDAP test forum. I followed this tutorial https://jotaelesalinas.github.io/laravel-simple-ldap-auth/ But I am unable to login. I am not getting any errors. In the below code always else block is executing. I think I have made mistake in configuration Please help me Thank You login controlle

shariff's avatar
shariff's avatar zouhair5yrs agoLaravel
9
1
Last reply by zouhair 5yrs ago
SajjadAli97's avatar

Laravel elquent existing table issue.

So I have been trying to follow some online links for understanding how eloquent can be used in defining relationships in table.What I would actually want to try is to use my existing tables for creating models and then define relationships using eloquent. Now I am not using migrations, since I had already created my tables and have configured the connection and other settings(

SajjadAli97's avatar
SajjadAli97's avatar tisuchi6yrs agoLaravel
1
1
Last reply by tisuchi 6yrs ago
clarg18's avatar

Sharing model with all views via ASP breaks unit tests

Hello, Since I added the following to my AppServiceProvider.php class: public function boot() { View::share('statuses', Status::all()); } All of my unit tests now error out with the following returned from phpunit: 57) Tests\Feature\StaffTest::staffValidationActiveMustBoolean Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such tab

clarg18's avatar
clarg18's avatar GlenUK6yrs agoTesting
7
1
Last reply by GlenUK 6yrs ago
mdupor's avatar

assertSee returning green when it shouldn't

I am following this series https://laracasts.com/series/lets-build-a-forum-with-laravel/episodes/3 The issue I'm having is that tests are returning green when they should have failed. The method is the same as Jeff is using (together with a setUp()), and DB for phpunit is in-memory sqlite: public function a_user_can_read_replies_that_are_associated_with_thread() { $reply =

mdupor's avatar
mdupor's avatar Tray24yrs agoLaravel
31
1
Last reply by Tray2 4yrs ago
Saneesh's avatar

Follower-following relation

Hi All, I'm following Adam Wathan's 'Test Driven Laravel' to learn TDD. As part of it I want to implement a follower-following relationship and https://stackoverflow.com/questions/44913409/laravel-follower-following-relationships/44913501 App/User.php class User extends Authenticatable { // users that are followed by this user [user->] public function following() {

Saneesh's avatar
Saneesh's avatar Saneesh6yrs agoLaravel
5
1
Last reply by Saneesh 6yrs ago
esmaill23's avatar

LARAVEL TRIGGER MIGRATION PROBLEM ON TEST ENVIRONMENT

hello i have created a laravel migration as like below. it works on migrate on mysql in product env but not work on sqlite in testing env . thank you : public function up() { \Illuminate\Support\Facades\DB::unprepared('CREATE TRIGGER after_insert_price AFTER INSERT ON `movie_prices` FOR EACH ROW BEGIN IF((SELECT status from agreements wh

esmaill23's avatar
esmaill23's avatar Tray26yrs agoLaravel
5
1
Last reply by Tray2 6yrs ago
abkrim's avatar

[SOLVED] Upgrade system to PHP 7.4 fail only test for users

Hi. I'm desesperate. Today upgrade my develop system to PHP 7.4. Well after upgrade, run test and I see fails on Users tests. I run test by folder (models) Domain, Mailboxes. All work fine Run test for users, and I get error. Error? Only user nas a problem, and there're using mysql database, instead sqlite in memory. A simple test for verify problem function a_super_admin_can

abkrim's avatar
abkrim's avatar abkrim6yrs agoPHP
11
1
Last reply by abkrim 6yrs ago
pmusa's avatar

SQLSTATE[HY000]: General error: 1 no such column

Line 22 here is causing an error during PHPUnit tests (I use SQLite in memory for tests, but MySQL for dev/prod): https://i.imgur.com/pGqhwv0.png Error detail : https://i.imgur.com/oV6vPDC.png And here is the migration where you can clearly see the column does exist: https://i.imgur.com/bunZCsH.png I can't figure what's wrong. Can you help? Please note that everything works fin

pmusa's avatar
pmusa's avatar Tray26yrs agoTesting
1
1
Last reply by Tray2 6yrs ago
fylzero's avatar

Can I send an email without a database / user from the database?

Is it possible to use Laravel's Mail:to without actually passing it a database user or even having a database? I just have a super small site I want to build out a contact form on. Wondering if there is a way to do this or if I'm doing something wrong before just breaking down and using SQLite. My SendEmail.php Controller. <?php namespace App\Http\Controllers; use App\Mai

fylzero's avatar
fylzero's avatar rodrigo.pe...6yrs agoLaravel
4
1
Last reply by rodrigo.pedra 6yrs ago
uccdev's avatar

Laravel confused about where to find Auth files when I call "php artisan route:list"?

I'm setting up my laravel project for login and registration. I've run the npm install dev && npm run dev and gotten all the required files. I have my relevant controllers like LoginController inside the App\Http\Controllers\Auth\LoginController directory (that part is important). I've also set up a populated SQLite database, with an Admin model. So I try to run a simpl

uccdev's avatar
uccdev's avatar uccdev6yrs agoLaravel
3
1
Last reply by uccdev 6yrs ago
Pixelairport's avatar

Best way to use database at testing

I try to start with testing and wrote my first tests. Now i want to test things with database. Normally it creates every entry in the database which is my main database. So i switch to sqlite (:memory:). That means i have to do migrations everytime. The problem is, that i use other apis to get data into the database which i need. Its an app for movies and i need to get 100 movi

Pixelairport's avatar
Pixelairport's avatar Pixelairpo...6yrs agoTesting
2
1
Last reply by Pixelairport 6yrs ago
mechelon's avatar

Test passes auth middleware but fails Auth::user() with data providers

I am testing my application (5.8) with the integrated PHPUnit configuration and I have problems with the authentication of a user inside a test. I have this test (shortened) public function testShowEditForm($user, $expectedStatus, $expectedLocation, $expectedSee, $expectedDontSee) { if ($user !== null) $this->actingAs($user); // $this->assertAuthenticated

mechelon's avatar
mechelon's avatar mechelon6yrs agoTesting
2
1
Last reply by mechelon 6yrs ago
jannevuori's avatar

SQLSTATE[HY000]: General error: 1 no such table

I've been trying to get the tests working on sqlite in memory database but I have been hitting the error 'SQLSTATE[HY000]: General error: 1 no such table' I have cleared the config cache over and over again and the connection is defined in phpunit.xml I am using Laravel 6.0.4 and globally installed phpunit is at version 8.3.5 PHP Version is 7.2.13 and SQLite version is 3.24.0 A

jannevuori's avatar
jannevuori's avatar MotionPhix1yr agoTesting
11
1
Last reply by MotionPhix 1yr ago
pmusa's avatar

php artisan config:cache did TRUNCATE my whole database

When I run this: php artisan config:clear it's all great and my phpunit tests run super fast (~500ms). But once I run this: php artisan config:cache then this vendor/bin/phpunit tests/Feature/ApiCommentsTest.php (note that this test file has trait use RefreshDatabase) it will take ~20sec for the test to complete but most importantly it will just erase my whole database. Glad I'

pmusa's avatar
pmusa's avatar pmusa6yrs agoLaravel
1
1
Last reply by pmusa 6yrs ago
hamedghaderi's avatar

Cumulative Query with Laravel Eloquent

Hey guys! I have a products table with a leftover column representing how many products left over. Now I want to write a query to find all remained products until a certain point. id | store_name | product_id | leftover -- | -------------------- | --------------- | ----------- 1 | Store 1 | 1 | 10 2 | Store 2 | 1 | 20 3 | Store 3

hamedghaderi's avatar
hamedghaderi's avatar hamedghade...6yrs agoEloquent
0
1
honeyBear's avatar

SQLSTATE[22032]: <<Unknown error>>: 3140 Invalid JSON text

"Invalid value." at position 0 in value for column 'steams.profileurl'. I recently switch from sqlite to mysql where I am using laragon right now. Back then when the database file was in sqlite everything works fine. Any idea why this is happening? (Migration files) public function up() { Schema::create('steams', function (Blueprint $table) {

honeyBear's avatar
honeyBear's avatar honeyBear6yrs agoLaravel
1
1
Last reply by honeyBear 6yrs ago
Batch's avatar

Laravel Can't Connect to Postgresql

Hi, When I try to connect postgresql server in my computer with Laravel I get "PDOException with message 'could not find driver'" error. I am getting this error when I run DB::connection()->getPdo(); command at artisan tinker. (If I run php artisan migrate command, the error is Illuminate\Database\QueryException : could not find driver (SQL: select * from informati

Batch's avatar
Batch's avatar allyvinod6yrs agoLaravel
6
1
Last reply by allyvinod 6yrs ago
crnkovic's avatar

Rollback database after each test method

Hey, I've got bunch of tests that used to run on Sqlite in memory database and it all works fine. Now that I need to run it against an actual MySQL database, errors keep on coming. I need database to be fresh (no data in it) each time a test function runs (not a test class, but each test method). I've been using RefreshDatabase trait which does the trick. Or doesn't. I have no

crnkovic's avatar
crnkovic's avatar bobbybouwm...6yrs agoTesting
3
5
Last reply by bobbybouwmann 6yrs ago
booni3's avatar

PHPUnit Assert Code Completion

I am using Laravel valet and have setup my PHP Storm as follows: Kept the default phpunit.xml file apart from updating the db_connection to sqlite and db_database to :memory: PHPUnit is installed with composer and setup in the PHP Storm languages and frameworks. PHPUnit version is showing as 7.4.3 so assume this means it is installed correctly. Set the default configurati

booni3's avatar
booni3's avatar Resin6yrs agoTesting
6
1
Last reply by Resin 6yrs ago
natepisarski's avatar

Should I make special migrations just for tests?

Background So, I have a suite of migrations in my app. These migrations run locally for the developers, on our testing server (develop), and on production to build the database up. Recently I've been trying to repair our migrations so that they run on both SQLite (for feature tests) and MySQL (for the running instances). It was tough. SQLite just isn't built for alter commands.

natepisarski's avatar
natepisarski's avatar natepisars...6yrs agoTesting
3
1
Last reply by natepisarski 6yrs ago
Omda's avatar

my testing taking too much time to pass

its working fine but its take a wile to run once function... take about 1.23 minuts. this phpunit.xml <?xml version="1.0" encoding="UTF-8"?> <phpunit backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions=

Omda's avatar
Omda's avatar flightsimm...6yrs agoTesting
4
1
Last reply by flightsimmer668 6yrs ago
b1narylife's avatar

"The table is empty :-("

No sure if I should post it here or create a discussion so apologies if this isn't the right place to do it. Anyway, I am going through build-a-laravel-app-with-tdd and I have followed along as one does however when I run phpunit, I get the error (pasted below my code). I am not sure why this is happening and would appreciate some help. My phpunit.xml has been updated so that

b1narylife's avatar
b1narylife's avatar jmourell5yrs agoTesting
12
1
Last reply by jmourell 5yrs ago
abbood's avatar

getting cannot rollback - no transaction when using slqite for laravel testing

I'm trying to use in memory sqllite for my laravel testing, by putting this in my .env file: 'sqlite_testing' => [ 'driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '', ] (it's in my .env.testing file, which is the same env specified in my phpunit.xml). However I keep on getting this error (even if I so much as run this command): php artis

abbood's avatar
abbood's avatar abbood6yrs agoTesting
0
1
mbo's avatar

Problems with installing valet

I had some problems with valet. I have used it for a while no but crashed. No i like to reinstall valet. But i don't get it installed again. This is what i did before (whit help) https://stackoverflow.com/questions/57477632/error-installing-php-71-with-homebrew-on-my-mac I got it sofar that a lot was running again: brew list apr c-ares glib libev libpq

mbo's avatar
mbo's avatar mbo6yrs agoLaravel
2
1
Last reply by mbo 6yrs ago
TomCoke's avatar

Different driver locally vs production

I'm completely new to Laravel. I want to use sqlite in my local environment and mysql on production. How do I do that? I cannot run my migrations if I remove the "default" in database.php where I also set up the array with "local" and "production" under "connections" with the appropriate driver. Thanks!

TomCoke's avatar
TomCoke's avatar jlrdw6yrs agoGeneral
6
5
Last reply by jlrdw 6yrs ago
Marduuk's avatar

First app in Laravel, could someone review one endpoint?

Heyo! I just wrote my very first application in Laravel 5.8 and I would love someone to take a look if i didn't mess application layers and tell me about one bug I'm wondering how to fix. The flow of application is simple, after accessing offers/get endpoint request 'flies' into OffersController, then request is handled by OfferService which fetches custom jobs offers from exte

Marduuk's avatar
Marduuk's avatar Marduuk6yrs agoLaravel
1
1
Last reply by Marduuk 6yrs ago
andreixfr's avatar

SQLSTATE[HY000] [2054] Server sent charset unknown to the client

I am trying to use my database again.Last night, php artisan migrate worked for me, but now I got some weird errors.Name of my table is andrei_db, name root. In Connection.php line 647: SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers (SQL: select * from information_schema.tables where table_schema = andrei_db and table_n

andreixfr's avatar
andreixfr's avatar siangboon6yrs agoLaravel
2
1
Last reply by siangboon 6yrs ago
bencarter78@hotmail.com's avatar

Setting up Dusk with testing database

Hello I'm having real issues with getting Dusk to work with a testing database. I seem to have gone through every piece of advice and still no luck. Dusk is not loading my .env.dusk.local file for some reason. Can anyone help? // test class ApplicationTest extends DuskTestCase { use DatabaseMigrations; /** @test */ public function it_works() { $this->

bencarter78@hotmail.com's avatar
bencarter78@hotmail.com's avatar bencarter7...7yrs agoTesting
2
1
Last reply by bencarter78 7yrs ago
wizjo's avatar

Phpunit configuration refresh my database

When I run phpunit --stop-on-failure command I got an error: Tests\Unit\ExampleTest::testBasicTest Illuminate\Database\QueryException: SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'project_id' doesn't exist in table (SQL: alter table `tasks` add constraint `tasks_project_id_foreign` foreign key (`project_id`) references `projects` (`id`) on delete cascade)

wizjo's avatar
wizjo's avatar wizjo7yrs agoTesting
16
2
Last reply by wizjo 7yrs ago
eberedigital's avatar

Hashed user password in error log, can it be removed?

So I tried to register a user, failed since it didn't have access to the .sqlite file (woops) But it then posted the failed sql query which does include the hashed password for the user, I don't really like passwords in the logs. Is there a way to filter this out in Laravel natively?

eberedigital's avatar
eberedigital's avatar Nakov7yrs agoLaravel
1
1
Last reply by Nakov 7yrs ago
jove's avatar

Hashed user password in error log, can it be removed?

So I tried to register a user, failed since it didn't have access to the .sqlite file (woops) But it then posted the failed sql query which does include the hashed password for the user, I don't really like passwords in the logs. Is there a way to filter this out in Laravel natively?

jove's avatar
jove's avatar devfrey7yrs agoLaravel
3
1
Last reply by devfrey 7yrs ago
nexxai's avatar

PHPUnit will not use :memory: database

Ok so I'm definitely taking crazy pills, I just can't figure out which ones. No matter what I do, I cannot get PHPUnit to use the in-memory database. I've tried: Setting my .env to this (just to ensure it wasn't using the real database connection in the background): DB_CONNECTION=sqlite DB_DATABASE=":memory:" and also: DB_CONNECTION=testing while having database.php

nexxai's avatar
nexxai's avatar nexxai7yrs agoCode Review
6
1
Last reply by nexxai 7yrs ago
untymage's avatar

Why are my tests is slower than Jeffrey's tests?

OS : Windows 10 Hardware: i7 - 6700k, SSD 850 EVO - 16Gig RAM ENV : Vagrant / PHPStorm Hello everyone, I'm just wondering at why my tests are slow? Despite the fact that Jeffrey tests with 40 tests and 80 assertion are done in less than 1 seconds (500ms) , But the default laravel test with 1 assertion in my side It takes more than 1 second ? : Time: 1.63 seconds, Memory: 22.00

untymage's avatar
untymage's avatar diegoaurin...7yrs agoTesting
3
1
Last reply by diegoaurino 7yrs ago
PoncetheLion's avatar

PHPUnit MySQL in memory test with point and polygon column

I have a migration for a table as following: use Illuminate\Support\Facades\Schema; use Grimzy\LaravelMysqlSpatial\Schema\Blueprint; //use this as blueprint use Illuminate\Database\Migrations\Migration; Schema::create('properties', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->point('position'); $t

PoncetheLion's avatar
PoncetheLion's avatar gourab6yrs agoCode Review
9
1
Last reply by gourab 6yrs ago
jbreuer95's avatar

More useful form validation feature tests

I built a big CMS system so it was time I started learning how to test, whoops. I watched a bunch of videos but testing form validation rules seemed like a lot of work that isn't even that useful. You aren't really testing your own code, you are testing the validation rules Laravel provides. Yes, it comes in handy when you remove a validation rule unintended but how often would

jbreuer95's avatar
jbreuer95's avatar jbreuer957yrs agoTesting
4
1
Last reply by jbreuer95 7yrs ago
thesogafoi's avatar

i have problem with pdo_sqlite

Hey guys i am using ubuntu 18.01.1 LTS and i use linuxbrew for install valet on my pc , i use sqlite in my laravel but i get php warning and it doesnot work i install sqlite with brew and apt-get for ubuntu but still fail Here's my warning PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite.so' (tried: /usr/lib/php/20180731/pdo_sqlite.so (/usr/lib/php/2018073

thesogafoi's avatar
thesogafoi's avatar kroko5yrs agoLaravel
17
143
Last reply by kroko 5yrs ago
ArneDB's avatar

I ran two tests (Dusk & Feature) simultaneously, now I can't run feature tests, anyone had this before?

Hello there, Title says all, I ran two tests (Dusk & Feature) simultaneously, now I can't run feature tests, anyone had this before? I seem to be getting errors related to database, which make me wonder if my migrations are failing. For example: Session is missing expected key [errors]. Failed asserting that false is true. What happend was, I had a dusk test running in the

ArneDB's avatar
ArneDB's avatar ArneDB7yrs agoGeneral
1
1
Last reply by ArneDB 7yrs ago
itsjoshbruce's avatar

Laravel 5.8 Testing w/ Database Must Run One at a Time

Odd behavior that could be coming from the not doing it correctly place. I'm also not sure what all information would help keep this succinct yet cover the issue - updates will be added ass necessary. Consider a vanilla Laravel install. // UserTest.php class UserTest extends TestCase { use RefreshDatabase; public function testOne() { $user = User::make(['e

itsjoshbruce's avatar
itsjoshbruce's avatar amidknight7yrs agoTesting
2
1
Last reply by amidknight 7yrs ago
AlexG834's avatar

Database does not exist when trying to use MySQL for PHPUnit tests

I have a MySQL database on my local machine that I use for development. Up to now, I've been using sqlite in-memory databases for my testing, but I want to test my suite against a MySQL database. I've set up a new connection that uses the same details as my local development MySQL, but with a different database name. If I try to run a test, I get the following error: Illuminate

AlexG834's avatar
AlexG834's avatar AlexGodbeh...7yrs agoTesting
8
11
Last reply by AlexGodbehere 7yrs ago
derrickrozay's avatar

adding a whereBetween clause doesnt return expected result set

I am using Laravel 5.6 and SQLite I am trying to return certain results between a time frame. The problem is that when I add a whereBetween clause on the created_at column it is missing results. created_at is of type DateTime Example dataset id,created_at, status, category, c_sub_category 1, 2019-01-02 16:36:06, closed, Issue, Team 1 2, 2019-01-03 18:36:01, closed, Fix, Team 2

derrickrozay's avatar
derrickrozay's avatar bobbybouwm...7yrs agoLaravel
1
1
Last reply by bobbybouwmann 7yrs ago

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.