Laravel Nova

Nova is an admin panel designed to manage your Eloquent models and other things. It can work hand in hand with Statamic.

We’ve heard users saying they’d like to manage the front-end with Statamic and the back-end with Nova. That’s fine! It’s possible to run both Statamic and Nova together.

If you’d like to manage Eloquent models within Statamic, you’re able to do that, too.

  1. Install Nova as per their documentation
  2. Disable Statamic’s front-end routing. It conflicts with Nova.
    // config/statamic/routes.php
    'enabled' => false,
    
  3. Add Statamic’s routes that you just disabled, to your own routes file.
    // routes/web.php
    Statamic::additionalWebRoutes();
    Route::any('/{segments?}', '\Statamic\Http\Controllers\[email protected]')
       ->where('segments', '(?!nova|cp).*')
       ->name('statamic.site');
    
  4. Create a dedicated auth guard and provider for Statamic.
    // config/auth.php
    'guards' => [
         'web' => [
             'driver' => 'session',
             'provider' => 'users',
         ],
         'statamic' => [
             'driver' => 'session',
             'provider' => 'statamic',
         ],
    ],
    
    'providers' => [
         'users' => [
             'driver' => 'eloquent',
             'model' => \App\User::class,
         ],
         'statamic' => [
             'driver' => 'statamic',
         ],
    ],
    
  5. Configure Statamic to use that guard.
    // config/statamic/users.php
    'guards' => [
         'cp' => 'statamic',
         'web' => 'statamic',
    ],
    
Betterify this page on Github!