Just in case anyone has the same question, this function is using 'Notations', and is called because his @before
on comments.
Here is the source code:
trait DatabaseTransactions
{
/**
* @before
*/
public function beginDatabaseTransaction()
{
$this->app->make('db')->beginTransaction();
$this->beforeApplicationDestroyed(function () {
$this->app->make('db')->rollBack();
});
}
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community