小编Meh*_*man的帖子

如何在Web应用程序中使用条形码扫描仪

我想在Laravel应用程序中使用条形码扫描仪。这是在线销售点应用程序。我知道条形码扫描仪仅返回一个字符串,然后按Enter键。但是要捕获此字符串,我需要使用一个表单并选择输入字段。如果我不选择输入字段,则无法捕获数据。我想要的是不选择表格就使用条形码扫描仪。反正有可能吗?

javascript php web-applications barcode laravel

5
推荐指数
2
解决办法
9651
查看次数

如何在 Laravel 控制器中使用方法重载?

我正在尝试在我的 Laravel 控制器类中使用方法重载功能。这是我的方法

  # Load Customer Balance View
  public function createBalance()
  {
    return view('customer.balance');
  }

  # Load Customer Balance View
  public function createBalance($CustomerID)
  {
    // show balance of the the defined customer
  }
Run Code Online (Sandbox Code Playgroud)

这是我的路线 -

    // customer balance
    Route::get('Customer/Balance', 'CustomerController@createBalance');

    Route::get('Customer/Balance/{ID}', 'CustomerController@createBalance');
Run Code Online (Sandbox Code Playgroud)

但它显示了错误 -

FatalErrorException in CustomerController.php line 45:
Cannot redeclare App\Http\Controllers\CustomerController::createBalance()
Run Code Online (Sandbox Code Playgroud)

请问有什么解决办法吗?

php oop overloading laravel

2
推荐指数
1
解决办法
5662
查看次数

标签 统计

laravel ×2

php ×2

barcode ×1

javascript ×1

oop ×1

overloading ×1

web-applications ×1