webmavens/laravelscandocument

This will send to textract for scanning image.

Downloads

152

Stars

0

Version

0.0.8

This will send to textract for scanning image.

This package allows you to scan document with laravel.Amazon Simple Notification Service (Amazon SNS) is used for scan document. It is using offical AWS SDK for PHP and Amazon SNS Message Validator for PHP.

Installation

You can install the package via composer:

composer require webmavens/laravelscandocument

Usage

  • Please create SNS topic in your amazon account.

  • How to create one ?

  • Please create IAM Role for textract. Follow this link.

  • Please create SNS topic by searching SNS in your aws account.

  • After creating topic, please add subscribe url to SNS topic below.

Note :- Please do not set up raw message delivery for callback url.

https://{YOUR_DOMAIN_NAME}/textractCallback
  • Please add below parameters to your .env file.
AWS_DEFAULT_REGION = 'YOUR_AWS_DEFAULT_REGION',
AWS_ACCESS_KEY_ID = 'YOUR_AWS_ACCESS_KEY_ID',
AWS_SECRET_ACCESS_KEY = 'YOUR_AWS_SECRET_ACCESS_KEY',
AWS_BUCKET = 'YOUR_AWS_BUCKET',
AWS_ARN_TOPIC_ID = 'YOUR_AWS_ARN_TOPIC_ID',
AWS_SNS_TOPIC_ID = 'YOUR_AWS_SNS_TOPIC_ID',
  • Please publish migrate file.
php artisan vendor:publish --tag="laravelscandocument-migrations"
  • Send document to scan
$laravelScandocument = new Webmavens\LaravelScandocument();
// $path = File path
// $jobtag = Type of document
$response = $laravelScandocument->sendDocToScan($path,$jobtag); //$jobtag is optional.It should be string.
  • You will find scan document text in laravel_scandocument_data table.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

webmavens

Author

webmavens