web.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 redirect('/admin/login');
  14. });
  15. Route::get('attachment/{md5}', [
  16. 'as' => 'attachment.download',
  17. 'uses' => 'Web\AttachmentController@download',
  18. ]);
  19. Route::get('image/{md5}', [
  20. 'as' => 'attachment.image',
  21. 'uses' => 'Web\AttachmentController@image',
  22. ]);
  23. Route::get('/test',function() {
  24. // $password = bcrypt('admin');
  25. // dd($password);
  26. // dd(dict()->get('user_info','work_type'));
  27. // $password = bcrypt('admin');
  28. // dd($password);
  29. $obj = new \App\Services\User\Info();
  30. $obj = $obj->find(1);
  31. // var_dump($obj);exit;
  32. // $user = UserInfoModel::find(1);
  33. dump(Auth::guard('admin')->user());
  34. Auth::login($obj);
  35. dd(Auth::user());
  36. });
  37. //Route::get('/test', 'Web\AuthController@test');