From 8ae069aea60d979ae3e7268c112df93263251db8 Mon Sep 17 00:00:00 2001 From: ravenberg Date: Sun, 5 Jan 2020 18:37:44 +0100 Subject: [PATCH] Fixed the exporting of DashboardController.stub --- src/InertiaReactPreset.php | 4 +++- src/stubs/Controllers/DashboardController.stub | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/InertiaReactPreset.php b/src/InertiaReactPreset.php index 14c1a69..faafcb4 100644 --- a/src/InertiaReactPreset.php +++ b/src/InertiaReactPreset.php @@ -188,7 +188,8 @@ public static function exportInertiaBladeView() } /** - * Export the Auth controllers that override the default ones that try to render blade views. + * Export the Auth controllers that override the default ones that try to render blade views. Also exports the + * dashboard controller. */ public static function exportAuthControllers() { @@ -198,6 +199,7 @@ public static function exportAuthControllers() File::copy(__DIR__.'/stubs/Controllers/Auth/ForgotPasswordController.stub', app_path('Http/Controllers/Auth/ForgotPasswordController.php')); File::delete(app_path('Http/Controllers/ResetPasswordController.php')); File::copy(__DIR__.'/stubs/Controllers/Auth/ResetPasswordController.stub', app_path('Http/Controllers/Auth/ResetPasswordController.php')); + File::copy(__DIR__.'/stubs/Controllers/DashboardController.stub', app_path('Http/Controllers/DashboardController.php')); } /** diff --git a/src/stubs/Controllers/DashboardController.stub b/src/stubs/Controllers/DashboardController.stub index 88e21cb..9d89f7d 100644 --- a/src/stubs/Controllers/DashboardController.stub +++ b/src/stubs/Controllers/DashboardController.stub @@ -7,6 +7,9 @@ use Inertia\Inertia; class DashboardController extends Controller { + /** + * @return \Inertia\Response + */ public function index() { return Inertia::render('Dashboard/Index');