Skip to content

Commit 7b96130

Browse files
committed
commit add auth
1 parent ef6756f commit 7b96130

File tree

1,900 files changed

+85258
-78
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,900 files changed

+85258
-78
lines changed

app/Http/Controllers/Auth/LoginController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class LoginController extends Controller
2626
*
2727
* @var string
2828
*/
29-
protected $redirectTo = RouteServiceProvider::HOME;
29+
// protected $redirectTo = RouteServiceProvider::HOME;
30+
protected $redirectTo = RouteServiceProvider::POST;
3031

3132
/**
3233
* Create a new controller instance.
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\Contracts\Support\Renderable
23+
*/
24+
public function index()
25+
{
26+
return view('home');
27+
}
28+
}

app/Providers/RouteServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class RouteServiceProvider extends ServiceProvider
2222
* @var string
2323
*/
2424
public const HOME = '/home';
25+
public const POST = '/post';
2526

2627
/**
2728
* Define your route model bindings, pattern filters, etc.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"require-dev": {
1717
"facade/ignition": "^1.16.15",
1818
"fakerphp/faker": "^1.9.1",
19+
"laravel/ui": "1.0",
1920
"mockery/mockery": "^1.0",
2021
"nunomaduro/collision": "^3.0",
2122
"phpunit/phpunit": "^8.5.8|^9.3.3"

composer.lock

Lines changed: 62 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)