implode-io / implode.io

This repository is currently only used for issue tracking for https://implode.io/
22 stars 0 forks source link

DB::transaction() causes exception "Class Config not found" #15

Open 6562680 opened 4 years ago

6562680 commented 4 years ago

I pressed "New Eloquent / Database", then wrote

Post::create(['content' => '1']);

DB::transaction(function () {
   Post::create([ 'content' => 2 ]);

   throw new Exception('Hello');
});

return Post::first();

DB::transaction() causes exception "Class Config not found"

===

Ps wanted to test is laravel catching Errors or retrow it...

daverogers commented 3 years ago

You need to set Framework to Laravel 5.x, then it should run as you expect. I ran into this same error just running the default code.

@z-song: this should be set by default when creating a new Eloquent & Database project.