raghub-fe / app /Http /Controllers /FrontendController.php
lifedebugger's picture
Deploy files from GitHub repository with LFS
6cd3bab
<?php
namespace App\Http\Controllers;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
class FrontendController extends Controller
{
public function index(): BinaryFileResponse
{
$indexPath = public_path('fe/index.html');
abort_unless(file_exists($indexPath), 503, 'Frontend build is missing. Run npm --prefix frontend run build.');
return response()->file($indexPath);
}
}