michaeldrennen/Geonames

Error when running route:cache

Closed this issue · 3 comments

./artisan route:cache
gives that result :

Route cache cleared!

In Route.php line 917:
Unable to prepare route [geonames/examples/vue/element/autocomplete] for serialization. Uses Closure```

I guess example routes should be commented by default ?

--- a/<html>web.php (<b>24 déc. 2019 02:45:55</b>)</html>
+++ b/<html><b>Current File</b></html>
@@ -18,6 +18,8 @@
 
 Route::get( '/geonames/{countryCode}/schools/{asciiNameTerm}', '\MichaelDrennen\Geonames\Controllers\GeonamesController@schoolsByCountryCode' );
 
+/*
+ * Examples for frontend routes :
 Route::get( '/geonames/examples/vue/element/autocomplete', function () {
     return view( 'geonames::vue-element-example' );
 } );
@@ -25,3 +27,5 @@
 Route::get( '/geonames/examples/jquery/autocomplete', function () {
     return view( 'geonames::jquery-example' );
 } );
+ * 
+ */
\ No newline at end of file

Like this ?

Yeah. They mention this in the docs:
https://laravel.com/docs/7.x/deployment#optimizing-route-loading

I commented them out, and left a note.