Esempio n. 1
0
    if (Auth::user()) {
        return view("layouts.home");
    } else {
        return Redirect::to(route('auth.getLogin'));
    }
}]);
Route::get('/help', ['as' => 'help', function () {
    if (Auth::user()) {
        return view("layouts.help");
    } else {
        return Redirect::to(route('auth.getLogin'));
    }
}]);
Route::get('/courses', ['as' => 'courses', function () {
    if (Auth::user()) {
        return view("layouts.courses")->with(["courses" => App\Course::All(), "user" => Auth::user()]);
    } else {
        return Redirect::to(route('auth.getLogin'));
    }
}]);
Route::get('/contact', ['as' => 'contact', function () {
    if (Auth::user()) {
        return view("layouts.contact");
    } else {
        return Redirect::to(route('auth.getLogin'));
    }
}]);
Route::post('/contact', ['as' => 'postContact2', function () {
    if (!Auth::user()) {
        return Redirect::to(route('auth.getLogin'));
    }
Esempio n. 2
0
 public function createCurriculum()
 {
     $courses = Course::All();
     return view('admin.create-curriculum', compact('courses'));
 }