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

mstnorris's avatar

Getting Dusk to run from the command line & PhpStorm

Has anyone got Dusk successfully working from both the command line and PhpStorm using a separate database whether thats a MySQL or SQLite DB? I would like to be able to run my entire testsuite (both unit and feature tests which I can do currently using an in-memory SQLite database from both the command line and from within PhpStorm using the Run Configuration. Now I would like

mstnorris's avatar
mstnorris's avatar mstnorris7yrs agoGeneral
0
1
Benjiii's avatar

Access to client-side shoppingcart from Mobile-App (Cordova)

Hello, currently I have the following problem: We have a mobile app (JS) through which the user can manage a shopping cart and a wishlist. Both should be stored on the servers-database (client-side) WITHOUT previous user authentication. The authentication of the user will be done later by Laravel Passport, if the user wants it. My problem is that I don't know how to assign the

Benjiii's avatar
Benjiii's avatar Benjiii7yrs agoJavaScript
0
1
HUGE_DICK_10_INCHES's avatar

Laravel works with non existing database

I noticed a problem with my local app, It worked for some time but recently uploading images stopped working. It does upload but nothing shows on frontend. Now I did direct change in database, the only one I have on my machine. I added new row in users table, but when I use php artisan tinker with App\User::all() I get only few from before, not recently added ones. My .env has

HUGE_DICK_10_INCHES's avatar
HUGE_DICK_10_INCHES's avatar munazzil7yrs agoLaravel
3
1
Last reply by munazzil 7yrs ago
marcellopato's avatar

Why in a fresh installation?

I just did a fresh installation of Laravel. Why it gives me all these suggestions? symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump) symfony/routing suggests installing doctrine/annotations (For using the annotation loader) symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader) symfony/routing sug

marcellopato's avatar
marcellopato's avatar tomopongra...7yrs agoLaravel
1
1
Last reply by tomopongrac 7yrs ago
rhymesey's avatar

Laravel Dusk DB Seeding

Hi, I'm trying to run Laravel dusk with a sqlite db in memory, but I need to seed the database for the tests to work. I am using the use DatabaseMigrations; trait on the tests and tried to use $this->seed(DatabaseSeeder::class); at the beginning of the test to seed the database but it doesn't seem to add anything to the database when the tests run and errors. Thanks!

rhymesey's avatar
rhymesey's avatar rhymesey7yrs agoTesting
0
1
TimeSocks's avatar

In a complete mess with Vue and Charts.js

Hi folks, I am getting myself in a complete mess trying to put together a simple chart for a weather station I am putting together. The idea is that a wifi enabled micro-controller will, via a Python script, populate an SQLite database with temperature, humidity, and pressure data. That part is all set up. For the moment I have test data in the database. I have set up a Laravel

TimeSocks's avatar
TimeSocks's avatar realrandya...7yrs agoVue
4
1
Last reply by realrandyallen 7yrs ago
kgp43's avatar

Alter table auto_increment, syntax error

I'm trying to make my ID increment start at 14000, but getting an error - not sure why. public function up() { Schema::create('configurations', function (Blueprint $table) { $table->increments('id'); $table->string('short_description'); $table->text('long_description')->nullable(); $table->text('internal

kgp43's avatar
kgp43's avatar kgp437yrs agoLaravel
8
1
Last reply by kgp43 7yrs ago
abduljakul-salsalani's avatar

Using Phpunit/ Why phpunit removes all data in my database

I'm trying to test my functions but everytime I try to run phpunit, it will delete all the records in my tables. I already setup my phpunit.xml file, to just in my test database, I just followed everything in the docs, do I have to setup a sqlite inmy machine, since I don't have that ? or what ? I only have laragon installed and phpmyadmin. phpunit.xml file <?xml versio

abduljakul-salsalani's avatar
abduljakul-salsalani's avatar Sergiu177yrs agoTesting
7
1
Last reply by Sergiu17 7yrs ago
colapiombo's avatar

Installation Fail

i try to install laravel on a fedora system and i use this guide : https://developer.fedoraproject.org/start/sw/web-app/laravel5.html i used the command : Laravel new testproject the installation stops on this command: Generating optimized autoload files @php -r "file_exists('.env') || copy('.env.example', '.env');" these messages before are like warning : symfony

colapiombo's avatar
colapiombo's avatar colapiombo7yrs agoLaravel
3
1
Last reply by colapiombo 7yrs ago
Ellis22's avatar

QueryException: General error: 1 no such table: categories

Laravel Version: 5.7 PHP Version: 7.2 Database Driver: sqlite Database: memory All testing on PHPUnit was working completely fine. But when I added View::share in AppServiceProvider then all the PHPUnit tests failed. AppServiceProvider.php class AppServiceProvider extends ServiceProvider { public function boot() { \View::share('categories', \App\Models\Categor

Ellis22's avatar
Ellis22's avatar Ellis227yrs agoLaravel
2
1
Last reply by Ellis22 7yrs ago
HUGE_DICK_10_INCHES's avatar

How to set database path in eloquent connection method

I am getting problem with setting path to sqlite path database. use Illuminate\Database\Capsule\Manager as Capsule; $capsule = new Capsule(); $capsule->addConnection([ 'driver' => 'sqlite', 'database' => './dbdata/db.sqlite', ]); $capsule->setAsGlobal(); $capsule->bootEloquent(); File with this code and dbdata folder are on same path, so I tried addin

HUGE_DICK_10_INCHES's avatar
HUGE_DICK_10_INCHES's avatar SkyCoder7yrs agoEloquent
2
1
Last reply by SkyCoder 7yrs ago
Tray2's avatar

phpunit class env does not exist?

All of a sudden all my tests except one fails stating that class env does not exist. The only thing I've done since I last had all my tests passing is updated some of my view files so I pretty much rule that out since it should only affect a couple of my tests. If I run them one by one they seems to pass like they should (Tested about ten of them). I tried updating to the lates

Tray2's avatar
Tray2's avatar Kel_7yrs agoTesting
3
1
Last reply by Kel_ 7yrs ago
abkrim's avatar

QueryException: Database (test.sqlite) does not exist

The scenario is somewhat complicated since I use two connections, one of mysql and another sqlite in production. On the other hand, I have the App and several packages, since it is an application to synchronize between different accounting systems. The tests I am trying to perform at the application level. Now when I want to test (I do not have much knowledge of the test system

abkrim's avatar
abkrim's avatar abkrim7yrs agoTesting
3
1
Last reply by abkrim 7yrs ago
esorone's avatar

syntax error, unexpected ';', expecting ']' on deployment

Hello all, I created a small app for a friend, and I try to install the app on his shared hosting environment. Unfortenately the only access I have (within his hosting plan) is FTP. I uploaded the files, added a .htaccess in the root to make sure that it is redirected to /public/ and no 403 anymore. But I still got the following error: [2018-12-07 15:54:07] laravel.ERROR: synta

esorone's avatar
esorone's avatar esorone7yrs agoGeneral
2
1
Last reply by esorone 7yrs ago
sustained's avatar

Automatic DB seeding for tests.

On one of my projects I don't need to call $this->seed() or $this->artisan('db:seed') at all and seeding just works by default. On another project I just started, I have to call those in setUp otherwise the DB is blank. Both are using SQlite and :inmemory:, same version of PHP+Laravel+SQlite, same machine even. Both are using the same base TestCase: abstract class TestCas

sustained's avatar
sustained's avatar sustained7yrs agoLaravel
2
1
Last reply by sustained 7yrs ago
timroush's avatar

Manually Seed RefreshDatabase

I'm running some migrations with SQLite, and my tests are using the RefreshDatabase trait. I also have seeders (registered in the DatabaseSeeder.php file) that should seed my tables. However, when I run my tests, the migrated databases are empty. That said, when I edit the RefreshDatabase trait to seed, it works fine: protected function refreshTestDatabase() { if (!

timroush's avatar
timroush's avatar lukmauu4yrs agoTesting
4
1
Last reply by lukmauu 4yrs ago
sustained's avatar

Query works fine via php artisan tinker but not in browser?

Basically what it says in the title. Input (command line) >>> \App\Project::all(); Output => Illuminate\Database\Eloquent\Collection {#2911 all: [ App\Project {#2912 id: "1", title: "A Project", description: "Best project ever.", created_at: "2018-11-13 03:29:55", updat

sustained's avatar
sustained's avatar sustained7yrs agoLaravel
2
1
Last reply by sustained 7yrs ago
finchy70's avatar

All tests started failing.

I have 35 tests with 85 assertions that all were passing. The tests are done in an in memory database using DataBaseMigrations. Every test now returns this error. BadMethodCallException: SQLite doesn't support dropping foreign keys (you would need to re-create the table). I have destroyed and re-upped my vagrant box (not that this would normally impact on in memory testing) b

finchy70's avatar
finchy70's avatar finchy707yrs agoTesting
2
1
Last reply by finchy70 7yrs ago
fogley's avatar

Cannot drop column and add new columns in same migration

I've created a migration that is supposed to drop columns as well as create new ones. When I drop the column, the migration does not add the the columns. When I remove the dropColumn call, the columns are added just fine. I use SQLite. Here's the simplified version: Schema::table('table', function($table) { $table->integer('new_column_name')->nullable();

fogley's avatar
fogley's avatar _Artak_7yrs agoLaravel
2
12
Last reply by _Artak_ 7yrs ago
PeregrineStudios's avatar

Fastest Way to Duplicate a ~9GB MySQL DB

I've inherited a project that's sort of a mish-mash of legacy code, multiple developers, and half-implemented pieces of Laravel (for example, they've brought in Eloquent but are only using the query builder). I'm tasked with implementing unit testing. It's actually been surprisingly straightforward so far, but now I'm coming up against the fact that there's no database seeding

PeregrineStudios's avatar
PeregrineStudios's avatar goatshark7yrs agoGeneral
4
1
Last reply by goatshark 7yrs ago
behnampmdg3's avatar

Da phUck? Weird issue with database access. Ignoring .env?

Tinker works fine smooth like a Swedish bikini model. But in browser I get lluminate \ Database \ QueryException (1045) SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) (SQL: select * from `posts`) routes <?php Auth::routes(); Route::get('/home', 'HomeController@index')->name('home'); Route::resource('posts', 'PostController');

behnampmdg3's avatar
behnampmdg3's avatar behnampmdg...7yrs agoGeneral
14
1
Last reply by behnampmdg3 7yrs ago
adrienpsn's avatar

Create password grant tokens in testing

Laravel Version: 5.7.* PHP Version: 7.2.9 Database Driver & Version: sqlite 7.2.9 Description: I want to test my oauth server (with laravel/passport package). I use unit tests, I use a memory database with PHPUnit, so I can not migrate the tables created by the package. I would like to be able to call the following commands in my test: $this->artisan('passport:client',

adrienpsn's avatar
adrienpsn's avatar adrienpsn7yrs agoLaravel
0
1
adrienpsn's avatar

Trying to get property 'name' of non-object

Laravel Version: 5.7.* PHP Version: 7.2.9 Database Driver & Version: sqlite 7.2.9 Description: When I launch my test, I have this error : ErrorException: Trying to get property 'name' of non-object Code My UserTest: /** * Disable exception handling * Act like a connected user * Seed database with seeder * Perform a GET request on `api/users` * Check if the response i

adrienpsn's avatar
adrienpsn's avatar adelf7yrs agoLaravel
1
1
Last reply by adelf 7yrs ago
fogley's avatar

Special characters will not print

When I fetch text data from my SQLite DB with special characters (ä), the string containing the character has the character b prefixed to the string, dd'ing the data looks like this: "column_name" => b"text containing ä This doesn't print anything when printed in views like so: {{ $object->column_name }} Any fixes?

fogley's avatar
fogley's avatar D97059967yrs agoLaravel
1
1
Last reply by D9705996 7yrs ago
klik's avatar

Lumen connection with postgresql on heroku

Hi. I have a problem with connection to DB on heroku. So far I have done the following steps: Created fresh Lumen project. Deployed project on heroku using this guide - https://devcenter.heroku.com/articles/getting-started-with-laravel Created fresh DB instance using this guide - https://mattstauffer.com/blog/laravel-on-heroku-using-a-postgresql-database/ Installed plugin to h

klik's avatar
klik's avatar jaythanki7yrs agoLumen
7
1
Last reply by jaythanki 7yrs ago
salvador98's avatar

could not find driver

hi . After uploading my site to the server, the site was working. But after a few days, the following error occurred Illuminate \ Database \ QueryException could not find driver (SQL: select * from visits) my env file: DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=dbname DB_USERNAME=dbuser DB_PASSWORD=password and in phpinfo() PDO support => enabled PDO dri

salvador98's avatar
salvador98's avatar Cronix7yrs agoLaravel
3
1
Last reply by Cronix 7yrs ago
grigory.shein@gmail.com's avatar

Use a separate database for settings

Hey guys! I'd like to use a separate database for settings (.sqlite) because the main database gets refreshed all of the time through "migrate:fresh --seed" and it's a pain. in config/settings.php I can specify a driver "database" and there I can specify a table. But can I specify a separate db connection? Thank you!

grigory.shein@gmail.com's avatar
grigory.shein@gmail.com's avatar grigory.sh...7yrs agoLaravel
3
1
Last reply by [email protected] 7yrs ago
fuelingtheweb's avatar

CircleCI SQLite3 with JSON

For my PHPUnit tests, I'm using an in memory sqlite database, and I have some JSON columns that I'm testing. I updated SQLite3 locally pretty painlessly to enable JSON support, but when my tests run on CircleCI, I keep getting this error: PDOException: SQLSTATE[HY000]: General error: 1 no such function: json_extract So, I'm thinking JSON is not enabled in SQLite3 when CircleCI

fuelingtheweb's avatar
fuelingtheweb's avatar fuelingthe...7yrs agoGeneral
2
1
Last reply by fuelingtheweb 7yrs ago
Barracuda's avatar

Trait RefreshDatabase does not always refresh the database between tests

I have a few hundred tests in my project. My test environment is simply a different MySQL schema in the homestead database. <php> <env name="APP_ENV" value="testing"/> <env name="BCRYPT_ROUNDS" value="4"/> <env name="CACHE_DRIVER" value="array"/> <env name=&

Barracuda's avatar
Barracuda's avatar nezarfadle7yrs agoLaravel
5
1
Last reply by nezarfadle 7yrs ago
bigweld86's avatar

Database tables deleted after running phpunit test

Hi. Every time I run a test all my database tables (except for the migrations table) are being deleted and I have to run the migrations again. For instance, if I have the following tables: migrations users tableA tableB after running: phpunit --filter user_can_view_a_record ViewRecordTest tests/Feature/ViewRecordTest.php my tables are deleted and I end up with just the migratio

bigweld86's avatar
bigweld86's avatar kreierson5yrs agoTesting
9
1
Last reply by kreierson 5yrs ago
stueynet's avatar

In memory database leads to The table is empty.

Decided to try out the in memory DB for testing on a new project. Using Homestead and the latest Laravel. Can't seem to get things working no matter what I try. Been through all of the threads on all the sites and nothing seems to be working. 1) Tests\Feature\UserTest::a_guest_should_be_able_to_register Failed asserting that a row in the table [users] matches the attributes {

stueynet's avatar
stueynet's avatar Ossy7yrs agoTesting
20
1
Last reply by Ossy 7yrs ago
rudexpunx's avatar

My tests run super slow

When I run testsuite for my seo forum on Homestead machine, it looks like this: PHPUnit 6.3.0 by Sebastian Bergmann and contributors. ................................................................. 65 / 65 (100%) Time: 47.5 seconds, Memory: 132.00MB OK (65 tests, 135 assertions) When I run them on my local machine, it takes forever: PHPUnit 6.3.0 by Sebastian Bergmann an

rudexpunx's avatar
rudexpunx's avatar rudexpunx7yrs agoTesting
2
1
Last reply by rudexpunx 7yrs ago
JoeCode's avatar

Database

From the Laravel docs it only supports the following: MySQL PostgreSQL SQLite SQL Server Which will be the recommended database to use Laravel with? Also how do we ensure that if our application is inproduction that we never get a size limit meaning it never max out. Is there syntax for that?

JoeCode's avatar
JoeCode's avatar JoeCode7yrs agoLaravel
7
1
Last reply by JoeCode 7yrs ago
mikail10000000's avatar

After running php artisan config:cache phpunit issue

Hi, I'm not 100% sure but I guess after running php artisan config:cache in testing mode I get an error about 'PRAGMA foreign_keys=on;' (I use SQLite for testing env ) , before that everything was running fine, I tried individual test and has same error, after I remove the DB::statement('PRAGMA foreign_keys=on;') from my setUp() the test started to work but extremely slow, it

mikail10000000's avatar
mikail10000000's avatar Cronix7yrs agoTesting
2
1
Last reply by Cronix 7yrs ago
martinbean's avatar

Dusk configuration; I’m doing something wrong

It’s the weekend. I shouldn’t be working, but I am! I’m trying to get some Dusk tests running, but having issues with environments. I’ve read the documentation and created a .env.dusk.local file with the following: DB_CONNECTION=dusk I’ve added a dusk connection to my config/database.php file: 'dusk' => [ 'driver' => 'sqlite', 'database' => database_path('dusk

martinbean's avatar
martinbean's avatar martinbean7yrs agoTesting
9
1
Last reply by martinbean 7yrs ago
BishoyWagih's avatar

General Error : 1 no such table Exists

why i see this error when running phpunit test 1) Tests\Feature\Item\ItemTest::it_can_see_items Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such table: categories (SQL: insert into"categories" ("code", "name", "updated_at", "created_at") values (94, Ea consectetur et voluptates velit., 2

BishoyWagih's avatar
BishoyWagih's avatar BishoyWagi...8yrs agoTesting
2
1
Last reply by BishoyWagih 8yrs ago
hepabolu's avatar

sticky database name across environments

I'm working through the Laracasts series on how to build a Forum and try to apply the instructions to my own app (Laravel 5.6). In one of the first episodes Jeffrey defines a test database as an in memory sqlite database while he manually tests in the browser using a MySQL database. I've tried to set up my own configuration similar to his setup but whatever I do, the unit tests

hepabolu's avatar
hepabolu's avatar bobbybouwm...7yrs agoLaravel
9
1
Last reply by bobbybouwmann 7yrs ago
camunha's avatar

Connect to SQL Server

Hi. I have a issue with connection to sql server in Laravel. I have a XAMPP server in windows 10. I have all pdo drivers. My php.info says this: PDO PDO support enabled PDO drivers mysql, odbc, sqlite, sqlsrv pdo_mysql PDO Driver for MySQL enabled Client API version mysqlnd 5.0.12.....

camunha's avatar
camunha's avatar camunha8yrs agoLaravel
0
1
patrikw1's avatar

cannot retrieve model from :memory: database

Hello, i ran to the issue where i cannot retrieve eloquent model from a :memory: sqlite database inside my tests, thing is that i am using where query while interacting with JSON column, let me give you an example: After model is created and i get all models.. for example Tag::first(); i get following: "id" => 1 "name" => array:1 [ "en&

patrikw1's avatar
patrikw1's avatar patrikw18yrs agoEloquent
1
1
Last reply by patrikw1 8yrs ago
makapaka's avatar

Tests are hanging in Lumen

Just started new tests in Lumen API, it hangs when I run it with vendor/bin/phpunit tests/ApiIntegrationTest.php Very simple test so far: <?php use Laravel\Lumen\Testing\DatabaseMigrations; use Laravel\Lumen\Testing\DatabaseTransactions; class ApiIntegrationTest extends TestCase { use DatabaseMigrations; /** @test */ public function get_benefits_list() {

makapaka's avatar
makapaka's avatar makapaka8yrs agoLumen
1
1
Last reply by makapaka 8yrs ago
minortechnologies's avatar

Lumen 5.5 POST tests using actingAs() returning 500 Error

I am having some strange behavior during testing in my Lumen 5.5 application. Any time that I try to call actingAs() and do a POST request I get a 500 error with Trying to get property of non-object in the logs as the error message. The route works when using postman so I’m not sure why it is unable to find the property on the Auth facade. What’s strange is that all GET calls t

minortechnologies's avatar
minortechnologies's avatar minortechn...8yrs agoTesting
5
1
Last reply by minortechnologies 8yrs ago
minortechnologies's avatar

No Tables Specified Error Following Successful Test

I am running into a strange error when unit testing my Lumen 5.5 application. The message I am getting in the console is: Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no tables specified (SQL: select * where "batch" = batch order by "migration" desc). Note: I am using DatabaseMigrations in the test class and I am also using a sqlite

minortechnologies's avatar
minortechnologies's avatar minortechn...8yrs agoTesting
1
1
Last reply by minortechnologies 8yrs ago
D9705996's avatar

Use a different Database for a single Test?

I have the following test setup that tries to add an entry to a model and when I run the following test with the sqlite in-memory database everything passes. $this->json('POST', 'api/v1/authentications/ssh/credentials', [ 'username' => 'root', 'password' => 'goofFnBfo9mi0Y', 'description' => 'test' ])->assertSta

D9705996's avatar
D9705996's avatar D97059968yrs agoTesting
2
1
Last reply by D9705996 8yrs ago
ronon's avatar

How to set the redis session driver?

On a site I expierence a lot of ","exception":"[object] (Illuminate\Database\QueryException(code: HY000): SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction (SQL: update `sessions` set `payload` = payload `last_activity` = 1520538614, `user_id` = USERID, `ip_address` = IP_ADDRESS, `user_agent` = USERAGENT where `id` =

ronon's avatar
ronon's avatar ronon8yrs agoLaravel
0
1
ssa4141's avatar

We were unable to install a project on your server (moonlit-reef) -> forge-github-aws

I can't install repository from github. please help me. Error Output Cloning into 'default'... Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Package operations: 32 installs, 0 updates, 0 removals Installing symfony/translation (v2.4.6): Loading from cache Installing symfony/security-core (v2.4.6): Loadin

ssa4141's avatar
ssa4141's avatar ssa41418yrs agoLaravel
1
1
Last reply by ssa4141 8yrs ago
StepToMe's avatar

Phpunit test not running with multiple database setup

We have a multi-tenancy set up with one main and other tenant databases and having some problems running non-sqlite tests. Databases are mysql. Currently trying to run tests against the main database and one tenant database. The connections in my model constructors are set like so: BaseMainModel $this->connection = config('database.main'); BaseTenantModel $this->connectio

StepToMe's avatar
StepToMe's avatar scottzirke...8yrs agoLaravel
7
1
Last reply by scottzirkel 8yrs ago
HCK's avatar

Test methods fail using Storage: Illuminate\Http\Testing\imagepng() in Laravel

Hello, I'm doing TDD to test my development, my tests were passing until I decided to reinstall php to repair the sqlite driver for testing (the main driver is mysql). So when I run my hole suite of tests this error shows in every method that uses the storage: Error : Call to undefined function Illuminate\Http\Testing\imagepng() {laravel}/framework/src/Illuminate/Http/

HCK's avatar
HCK's avatar Osama_Khal...8yrs agoTesting
1
1
Last reply by Osama_Khalid 8yrs ago
RyanHavoc's avatar

PHPUnit stalling or exhausting memory since upgrading to Laravel 5.6

Hi, I had a working test suite however two things have change on my local environment. 1) I've upgrade Homestead to version 7 and 2) I've upgraded my app to Laravel 5.6. Now I'm having issues with PHPUnit exhausting memory allocation unless I add ini_set('memory_limit', '1024M'); to the start of my createApplication method. My test suite then progresses a bit further but eventu

RyanHavoc's avatar
RyanHavoc's avatar RyanHavoc8yrs agoTesting
11
1
Last reply by RyanHavoc 8yrs ago
wardaddy's avatar

Laravel 5.4 - how to put file in the database directory

I'm working on the database restore menu for an application I created, I'm using sqlite for my database, and I want to put my previously backed up database file to the database directory backupAndRestore.blade.php <form method="POST" action="/admin/backupAndRestore/restore" enctype="multipart/form-data"> {{ csrf_field() }}

wardaddy's avatar
wardaddy's avatar wardaddy8yrs agoGeneral
8
1
Last reply by wardaddy 8yrs ago
thebigk's avatar

phpUnit is deleting my database!

Okay, I hope that this isn't a bug. This is my test case <?php namespace Tests\Feature\Discussions; use Tests\TestCase; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Foundation\Testing\RefreshDatabase; class ThreadsTest extends TestCase { use RefreshDatabase; /** @test */ public function guests_can_view_thread_list() { $thread = fac

thebigk's avatar
thebigk's avatar L1am2yrs agoLaravel
23
5
Last reply by L1am 2yrs 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.