web.php 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Web Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register web routes for your application. These
  8. | routes are loaded by the RouteServiceProvider within a group which
  9. | contains the "web" middleware group. Now create something great!
  10. |
  11. */
  12. Route::get('/', function () {
  13. return view('welcome');
  14. });
  15. Auth::routes();
  16. Route::get('/home', 'HomeController@index')->name('home');
  17. Route::get('/user','UserController@action');
  18. Route::get('/user/{id}', 'UserController@show')->where('id', '[0-9]+')->name('user.position');
  19. Route::get('/user/{id}/{date}', 'UserController@userdata')->where(['id'=>'[0-9]+','date'=>'[0-9]{4}-[0-9]{2}-[0-9]{2}'])->name('user.date');
  20. Route::get('/user/{id}/last', 'UserController@showLast')->where('id', '[0-9]+')->name('last.position');
  21. //Route::post('/tbot/'.Telegram::getAccessToken(), function(){
  22. // Telegram::commandsHandler(true);
  23. //});
  24. Route::post('/tbot/'.Telegram::getAccessToken(), 'Telegram@locations');
  25. //Route::post(Telegram::getAccessToken(), function () {
  26. // Telegram::commandsHandler(true);
  27. //});