Route::post('teachers/enquiry', 'TeacherController@postEnquiry'); Route::post('contact', 'TeacherController@postContact'); Route::post('teachers/call', 'TeacherController@postCall'); // Contact Us Route::get('contact', function () { return view('frontend.contact', ['page' => 'contact']); }); // Profile - Login Route::group(['prefix' => 'profile/{user}/update', 'middleware' => 'self'], function () { Route::get('personal', function (App\User $user) { return view('frontend.profile.update.personal', ['user' => $user, 'page' => 'profile']); }); Route::post('personal', 'ProfileController@updatePersonal'); Route::post('personal/picture', 'ProfileController@updateProfilePic'); Route::get('qualification', function (App\User $user) { $languages = App\Language::lists('language', 'id'); return view('frontend.profile.update.qualification', ['user' => $user, 'page' => 'profile', 'languages' => $languages]); }); Route::post('qualification', 'ProfileController@updateQualification'); Route::get('subjects', function (App\User $user) { $topicsDetail = Cache::remember('topicsDetail', Carbon\Carbon::now()->addDay(), function () { $topicsDetail = []; $grades = App\Grade::all(); foreach ($grades as $gradeKey => $grade) { $topicsDetail[$gradeKey]['name'] = $grade->name; foreach ($grade->subjects as $subjectsKey => $subject) { $topicsDetail[$gradeKey]['subjects'][$subjectsKey]['name'] = $subject->name; foreach ($subject->topics as $topicsKey => $topic) { $topicsDetail[$gradeKey]['subjects'][$subjectsKey]['topics'][$topicsKey]['name'] = $topic->name; $topicsDetail[$gradeKey]['subjects'][$subjectsKey]['topics'][$topicsKey]['id'] = $topic->id; }
// pass language and quality list into movie page View::composer('products.__video', function ($view) { // get data $languages = App\Language::lists('name', 'id')->toArray(); $qualities = App\Quality::lists('name', 'id')->toArray(); $view->with('languages', $languages)->with('qualities', $qualities); }); // pass platforms list into game page View::composer('products.__game', function ($view) { // get data $platforms = App\Platform::lists('name', 'id')->toArray(); $view->with('platforms', $platforms); }); // pass languages and platforms into toolbar View::composer('_navbar', function ($view) { $languages = App\Language::all(); $platforms = App\Platform::all(); $view->with('languages', $languages)->with('platforms', $platforms); }); // pass languages and genres into toolbar View::composer('videos._control_bar', function ($view) { $languages = App\Language::lists('name', 'name')->toArray(); $genres = App\Genre::lists('name', 'name')->toArray(); $view->with('languages', $languages)->with('genres', $genres); }); // pass platforms and genres into toolbar View::composer('games._control_bar', function ($view) { $platforms = App\Platform::lists('name', 'name')->toArray(); $genres = App\Genre::lists('name', 'name')->toArray(); $view->with('platforms', $platforms)->with('genres', $genres); });