/
routes.php
43 lines (26 loc) · 876 Bytes
/
routes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
$courses=App\Course::all();
return view('layouts.home',compact('courses'));
});
Route::get('courseregister', ['middleware'=>['auth'],function () {
$courses=App\Course::all();
return view('layouts.courseregister',compact('courses'));
}]);
Route::get('login', function () {
return view('auth.login');
});
Route::get('register', function () {
return view('auth.register');
});
Route::post('login', 'usercontroller@register');