Skip to content

Commit 6cfa941

Browse files
committed
Add HomeController for auth routes
1 parent 7da6bd2 commit 6cfa941

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

src/ZurbFoundationPreset.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ protected static function updateWelcomePage()
102102
*/
103103
protected static function addAuthTemplates()
104104
{
105+
// Add Home controller
106+
copy(__DIR__.'/foundation-stubs/Controllers/HomeController.php', app_path('Http/Controllers/HomeController.php'));
107+
105108
// Add Auth route in 'routes/web.php'
106109
$auth_route_entry = "Auth::routes();\n\nRoute::get('/home', 'HomeController@index')->name('home');\n\n";
107110
file_put_contents('./routes/web.php', $auth_route_entry, FILE_APPEND);
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
use Illuminate\Http\Request;
6+
7+
class HomeController extends Controller
8+
{
9+
/**
10+
* Create a new controller instance.
11+
*
12+
* @return void
13+
*/
14+
public function __construct()
15+
{
16+
$this->middleware('auth');
17+
}
18+
19+
/**
20+
* Show the application dashboard.
21+
*
22+
* @return \Illuminate\Http\Response
23+
*/
24+
public function index()
25+
{
26+
return view('home');
27+
}
28+
}

src/foundation-stubs/views/welcome.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
</div>
116116

117117
<div class="foundation_button_test">
118-
<p class="framwork_title">Zurb Foundation 6.4.1 Buttons</p>
118+
<p class="framwork_title">Zurb Foundation 6.4.1</p>
119119
<a class="button primary" href="#">Primary</a>
120120
<a class="button secondary" href="#">Secondary</a>
121121
<a class="button success" href="#">Success</a>

0 commit comments

Comments
 (0)