Skip to content Skip to footer navigation

Storing Laravel Users in Files

Store Laravel app users as Statamic YAML files when your project needs both frameworks sharing the same user format.

When creating new site using the statamic command or by cloning statamic/statamic, your Laravel application will be preconfigured
to store users as files. Nothing else is required!

If you've installed Statamic into an existing Laravel application, it will be expecting users to be stored in the database, but you can switch to the filesystem:

  1. In config/statamic/users.php, change repository to file.
  2. In config/auth.php, change the users provider driver to statamic.
    'providers' => [
    'users' => [
    'driver' => 'statamic',
    ],
    ],