Target class [CustomController] does not exist.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class CustomController extends Controller
{
public function proxy()
{
// Define the path to your HTML file
$filePath = '/var/www/reversed/index.html';
// Check if the file exists
if (file_exists($filePath)) {
// Read the contents of the HTML file
$htmlContent = file_get_contents($filePath);
// Return the HTML content as a response
return response($htmlContent, 200)
->header('Content-Type', 'text/html');
} else {
return response()->json(['error' => 'HTML file not found'], 404);
}
}
}
Route::get('/proxy', 'CustomController@customMethod');