Skip to content

Commit

Permalink
Merge pull request #545 from Laravel-Backpack/add-database-transactio…
Browse files Browse the repository at this point in the history
…n-docs

add db transaction docs
  • Loading branch information
pxpm authored Jan 30, 2024
2 parents e1d19d1 + 0b87eb1 commit 46f3c50
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 6.x/crud-how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -993,3 +993,11 @@ $schedule->command('backpack:purge-temporary-files')->hourly();
```

After adding this, you need to setup a cron job that will process the Laravel scheduler. You can manually run it in development with `php artisan schedule:run`. For production, you can setup a cron job take care of it for you. You can read more about it [here](https://laravel.com/docs/10.x/scheduling#running-the-scheduler).

<a name="enable-database-transactions-for-create-and-update"></a>
### Enable database transactions for create and update

In v6.6 we introduced the ability to enable database transactions for create and update operations. This is useful if you have a lot of relationships and you want to make sure that all of them are saved or none of them are saved.
You can enable this feature globaly at `config/backpack/base.php` by enabling `useDatabaseTransactions`.

> **Note:** This feature will be enable by default starting `v7`

0 comments on commit 46f3c50

Please sign in to comment.