Ich kann meine API-Anrufe nicht erhalten, irgendwelche Daten auf Ubuntu 16.04 zurückzugeben. Hier ist meine Methode in Routen/api.php:Laravel 5 api Route zurück 404 apache2
Route::get('comments', function() {
// If the Content-Type and Accept headers are set to 'application/json',
// this will return a JSON structure. This will be cleaned up later.
return Comment::all();
});
Und das ist in RouteServiceProvider:
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
Wenn ich localhost/api Hit/Kommentare Ich bekomme 404.
ich gemacht sicher AllowOverride All ist in meiner site.conf festgelegt.
Meine Datenbank hat eine Kommentare Tabelle mit Daten, die bevölkert wurde
Handwerker Samen mit