1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
Hello.
Please check the web server logs.
Since it is a 404 error, I think that the file is missing or that Laravel is not routing properly.
You should be able to check the routing information by moving to the directory containing Laravel and running the following command.
php artisan route:list
Contenuto pertinente
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 4 mesi fa
Hello, Riku_Kobayashi
Can you take a look at it for me? This is the routing information: " GET|HEAD/................................................ ................................................................. ............................ POST _ignition/execute-solution ............. ignition.executeSolution › Spatie\LaravelIgnition › ExecuteSolutionController GET|HEAD _ignition/health-check ........................ ignition.healthCheck › Spatie\LaravelIgnition › HealthCheckController POST _ignition/update-config ........................ ignition.updateConfig › Spatie\LaravelIgnition › UpdateConfigController GET|HEAD up........................................ ................................................................. .............................
"
As far as I can see from the results, there doesn't seem to be a route called "/install". Try adding a route to "/install". https://readouble.com/laravel/10.x/en/routing.html
Hi, Riku_Kobayashi
I navigated to my Laravel project directory (cd /var/www/mylaravel), entered the following code in the command line terminal: php artisan make:controller InstallControllers_openaitpl, and generated a controller file "InstallControllers_openaitpl.php". I added the following code to the file: "//app/Http/Controllers/InstallControllers_openaitpl.php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class InstallControllers_openaitpl extends Controller { public function index() { return view('install'); // Assuming you have a view named "install.blade.php" } } "save. At the same time, I opened web.php in the /var/www/mylaravel/routes/ directory and added the following code to the file: " use App\Http\Controllers\InstallControllers_openaitpl;
Route::get('/install', [InstallControllers_openaitpl::class, 'index']);
" save. When I enter my project URL (https://mydomain.com/install) in the browser, the page returns: "Cannot declare class App\Http\Controllers\InstallControllers_openaitpl, because the name is already in use " No matter how I change the namespace, the page always returns: "The name is already in use." Why does this happen? Did I do something wrong?
Best wishes!
If the error is correct, the class name may already be in use. The same error may also occur if there is a misspelling of "namespace". By the way, did you clear the cache after adding the route?
This may not be very relevant, but what happens if you change the class name as follows?
Hi, Riku_Kobayashi
This doesn't seem to work. Thank you for your help!