plugins/webkul/barcode/README.md
Barcode is a mobile-first AureusERP plugin for inventory operation workflows. It supports:
/admin/barcode/admin/barcode/loginhtml5-qrcodeinventories pluginmanufacturing pluginnativephp/mobile only if you are packaging the mobile appCopy this directory into the host app:
plugins/webkul/barcode
composer dump-autoload
php artisan package:discover --ansi
php artisan barcode:install --no-interaction
php artisan filament:assets --no-interaction
php artisan barcode:patch-native
Force-copy plugin-owned stubs if you need a full reset:
php artisan barcode:patch-native --force
Expected routes:
/barcode/admin/barcode/login/admin/barcode/admin/barcode/operations/{operationType}/admin/barcode/operations/{operationType}/transfers/{operation}This plugin does not use the paid NativePHP scanner.
It uses bundled html5-qrcode, served locally from:
plugins/webkul/barcode/resources/dist/html5-qrcode.min.jsThis plugin is distributed by copy/paste. Because of that, a few app-level changes still need to exist outside the plugin.
routes/web.phpJump / NativePHP may open / first. Without a native-aware root route, the app falls back to /admin/login instead of /admin/barcode/login.
Keep this in the host app:
<?php
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;
use Webkul\Barcode\Support\NativeApp;
Route::get('/', function () {
if (NativeApp::requestIsNative()) {
if (Auth::check()) {
return redirect()->route('barcode.dashboard');
}
return redirect()->route('barcode.login');
}
return redirect()->route('filament.admin.auth.login');
});
Route::redirect('/login', '/admin/login')
->name('login');
In .env and .env.example:
NATIVEPHP_START_URL=https://your-domain.tld/admin/barcode?nativephp=1
Use a full hosted barcode URL if the mobile app must talk to the central web server. Use a relative path only if you intentionally want the embedded NativePHP runtime.
In config/nativephp.php:
use Webkul\Barcode\Support\NativeApp;
'start_url' => env('NATIVEPHP_START_URL', NativeApp::startUrl()),
'permissions' => NativeApp::iosPermissions(),
The host app must load:
Webkul\Barcode\BarcodeServiceProviderFor this repository, that is done in:
bootstrap/providers.phpIf nativephp/mobile is installed, run:
php artisan barcode:patch-native
This patches the NativePHP mobile templates/projects for:
html5-qrcodeRun it again after native:install, after regenerating nativephp/, or after updating nativephp/mobile.
--force replaces the supported Android/iOS files with the stubs shipped in:
plugins/webkul/barcode/stubs/nativephpThe plugin declares Android camera requirements in:
plugins/webkul/barcode/nativephp.jsonVerify the final Android build includes:
android.permission.CAMERAandroid.hardware.camera.anyapp/Providers/AppServiceProvider.php.src/BarcodeServiceProvider.php by forcing http when Jump is detected.app/Providers/NativeServiceProvider.php does not need a barcode entry for the current copy/paste distribution model.composer dump-autoloadphp artisan package:discover --ansiphp artisan barcode:install --no-interactionphp artisan barcode:patch-native if you are building the mobile appphp artisan filament:assets --no-interaction/admin/barcode/login/admin/barcode/admin/login