From 53fef8e752e4d50805c9438651a28e575a106f72 Mon Sep 17 00:00:00 2001 From: Marttin Notta Date: Mon, 16 Jan 2023 16:33:50 +0200 Subject: [PATCH] Update changelog --- CHANGELOG.md | 6 ++++++ src/FieldServiceProvider.php | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b23dbe9..7a9a760 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. --- +## [3.1.2] - 16-01-2023 + +### Fixed + +- Fix API routes returning 404 by loading routes in at boot time not after + ## [3.1.1] - 06-01-2023 ### Fixed diff --git a/src/FieldServiceProvider.php b/src/FieldServiceProvider.php index c32483a..117328f 100644 --- a/src/FieldServiceProvider.php +++ b/src/FieldServiceProvider.php @@ -44,9 +44,7 @@ public function boot() } Route::middleware(config('nova-media-field.middlewares', [])) - ->group(function() { - $this->loadRoutesFrom(__DIR__ . '/routes.php'); - }); + ->group(__DIR__ . '/routes.php'); Validator::extend('height', '\OptimistDigital\MediaField\Classes\MediaValidator@height');