web.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. use App\Models\Lobby;
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Web Routes
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here is where you can register web routes for your application. These
  10. | routes are loaded by the RouteServiceProvider within a group which
  11. | contains the "web" middleware group. Now create something great!
  12. |
  13. */
  14. // old routes
  15. /*
  16. Route::get('/', function () {
  17. return view('start');
  18. });
  19. Route::get('/ll-test', function () {
  20. return view('TEST.sub');
  21. });
  22. Route::get('/join/{meetingID}', function () {
  23. return view('join');
  24. });
  25. Route::get('/meeting/{meetingID}/{participantID}', 'GuestController@meeting');
  26. */
  27. Route::middleware('ensureNoValidSession')->group(function(){
  28. Route::get('/', 'AppSessionController@proRequestSmsLogInToken')->name('pro-request-sms-login-token');
  29. Route::get('/pro/login', 'AppSessionController@proLogIn')->name('pro-login');
  30. Route::post('/pro/login', 'AppSessionController@processProLogIn')->name('process-pro-login');
  31. Route::get('/client/login', 'AppSessionController@clientLogIn')->name('client-login');
  32. Route::get('/client/login', 'AppSessionController@clientLogIn')->name('process-client-login');
  33. });
  34. Route::middleware('ensureValidSession')->group(function(){
  35. Route::get('/dashboard', 'ProController@dashboard')->name('pro-dashboard');
  36. // old routes
  37. // Route::get("/pros", 'ProController@index')->name('pro-index');
  38. // Route::get("/pros/create", 'ProController@create')->name('pro-create');
  39. // Route::get("/pros/show/{uid}", 'ProController@show')->name('pro-show');
  40. // Route::get('/pro/meeting/{meetingID}', 'ProController@meeting');
  41. Route::get('/pro/logout', 'AppSessionController@processProLogOut')->name('pro-logout');
  42. @include 'generated.php';
  43. Route::get('/mc/{fragment}', 'MeetingCenterController@mc')
  44. ->where('fragment', '.+')
  45. ->name('mc');
  46. });
  47. Route::post('/post-to-api', 'AppSessionController@postToAPI')->name('post-to-api');
  48. Route::post('/post-to-api-ajax', 'AppSessionController@postToAPIAjax')->name('post-to-api-ajax');
  49. Route::get('/client', 'ClientController@entranceNormal')->name('client-entrance');
  50. Route::get('/client/{url_slug}', 'ClientController@entranceLobby')->name('client-lobby');
  51. Route::get('/client/meeting/{meeting_uid}', 'ClientController@entranceLobby')->name('join-meeting');
  52. Route::bind('url_slug', function($value, $route)
  53. {
  54. return Lobby::where('url_slug', $value)->first();
  55. });
  56. Route::get('/note/{note_uid}', 'NoteController@renderNote')->name('render-note');
  57. Route::get('/select_section_template_form/{note_uid}', 'NoteController@selectSectionTemplateForm')->name('select_section_template_form');
  58. Route::get('/section_create_form/{note_uid}/{section_template_uid}', 'NoteController@sectionCreateForm')->name('section_create_form');
  59. Route::get('/section_update_form/{section_uid}', 'NoteController@sectionUpdateForm')->name('section_update_form');
  60. Route::post("/process_form_submit", 'NoteController@processFormSubmit')->name('process_form_submit');