web.php 1019 B

1234567891011121314151617181920212223242526272829
  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. });