diff --git a/back/app/Http/Controllers/AppController.php b/back/app/Http/Controllers/AppController.php new file mode 100644 index 0000000..9b1591b --- /dev/null +++ b/back/app/Http/Controllers/AppController.php @@ -0,0 +1,27 @@ +render(); + // return view('', ['ssr' => $ssr]); + // echo file_get_contents(base_path().'/../front/src/index.html'); + } + +} + diff --git a/back/app/Providers/RouteServiceProvider.php b/back/app/Providers/RouteServiceProvider.php index 3bd3c81..927be5d 100644 --- a/back/app/Providers/RouteServiceProvider.php +++ b/back/app/Providers/RouteServiceProvider.php @@ -26,7 +26,7 @@ class RouteServiceProvider extends ServiceProvider * * @var string|null */ - // protected $namespace = 'App\\Http\\Controllers'; + protected $namespace = 'App\\Http\\Controllers'; /** * Define your route model bindings, pattern filters, etc. diff --git a/back/public/index.php b/back/public/index.php index 1d69f3a..8b48781 100644 --- a/back/public/index.php +++ b/back/public/index.php @@ -3,6 +3,7 @@ use Illuminate\Contracts\Http\Kernel; use Illuminate\Http\Request; + define('LARAVEL_START', microtime(true)); /* @@ -53,3 +54,5 @@ )->send(); $kernel->terminate($request, $response); + + diff --git a/back/routes/web.php b/back/routes/web.php index b130397..e0a1356 100644 --- a/back/routes/web.php +++ b/back/routes/web.php @@ -1,6 +1,8 @@ '; + $indexHtml = File::get(base_path().'/../front/dist/front/index.html'); + $indexHtml = str_replace("", $metaTags , $indexHtml); + + return $indexHtml; + } else { + header('Content-Type: application/javascript; charset=UTF-8', true); + $contents = File::get(base_path().'/../front/dist/front/'.$angular); + $response = Response::make($contents, 200); + $response->header ('Content-type', 'application/javascript'); + return $response; + } +})->where('angular', '.*'); \ No newline at end of file diff --git a/front/src/index.html b/front/src/index.html index 1617a38..2d1fa24 100644 --- a/front/src/index.html +++ b/front/src/index.html @@ -1,6 +1,7 @@
+