Download the PHP package tejas/tejascaptcha without Composer
On this page you can find all versions of the php package tejas/tejascaptcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tejas/tejascaptcha
More information about tejas/tejascaptcha
Files in tejas/tejascaptcha
Package tejascaptcha
Short Description Tejas Captcha for the Laravel framework
License MIT
Homepage https://github.com/1007tejas/tejascaptcha
Informations about the package tejascaptcha
Tejas Captcha for the Laravel framework
The tejas/tejascaptcha is a service provider for Laravel. The package randomly generates either an alpha numeric captcha or a math captcha and provides both refresh and audio capabilities.
Section links
- Preview
- Compatibility
-
Installation
- Tejas Captcha
- Tejas Captcha Middleware - Captcha Verification
- Bootstrap - Laravel Installation
- Tejas Captcha Makefile - Post Install
- Register the Tejas Captcha service provider
- Configuration
- Publish the configuration file
Preview
Compatibility
The tejas/tejascaptcha service provider has been tested with Laravel versions 5, 6 and 7. Test were performed on a Linux / Debian / Apache2 web server.
Installation
Tejas Captcha
The TejasCaptcha Service Provider is installed via Composer.
From your projects root directory, open a terminal and run the command
composer require tejas/tejascaptchanpm install bootstrapnpm install @fortawesome/fontawesome-free
Tejas Captcha Middleware - Captcha Verification
app/Http/Middleware/VerifyTejasCaptcha.php
Middleware is used to verify that the captcha was correctly entered.
From your projects root directory, open a terminal and run the command:
cp vendor/tejas/tejascaptcha/src/app/Http/Middleware/VerifyTejasCaptcha.php app/Http/Middleware/.
This command copies the VerifyTejasCaptcha.php middleware stub file to your projects app/Http/Middleware folder.
app/Http/Kernel.php
In the app/Http/Kernel.php file at the bottom of the routeMiddleware section insert the following line:
'tejascaptcha_verify_captcha' => \App\Http\Middleware\VerifyTejasCaptcha::class,
Use this middleware declaration wherever the tejas/tejascaptcha is included in the Post submission.
example/routes/web.php
Example form submission route using tejascaptcha middleware
This route is declared in the example/routes/web.php file. It is part of the working example files included with the Tejas Captcha package. See example/README.md for implementation details.
Route::post('tejascaptcha_verify_form','TejasCaptcha_Controller@tejasCaptcha')->middleware('tejascaptcha_verify_captcha');
Bootstrap - Laravel Installation
Open a terminal, navigate to your projects root directory and run:
composer require laravel/uiphp artisan ui bootstrap- Alternatively if you also want the auth scaffoldings:
php artisan ui bootstrap --auth
- Alternatively if you also want the auth scaffoldings:
npm install && npm run dev
Tejas Captcha Makefile - Post Install
This step is optional.
To install the included Makefile run this from your projects root directory.
- cd vendor/tejas/tejascaptcha/scripts && bash postinstall.sh && cd ../../../../
The Makefile is installed inside the tejascaptcha directory in your projects root.
To run the tejascaptcha/Makefile after installing it; From your projects root directory run the following command with one of the specified make actions:
- make -C tejascaptcha [ install update test remove show_version ]
Register the Tejas Captcha service provider
This step is optional - tejas/tejascaptcha is registered automatically by Composer package discovery.
config/app.php
Register the tejas/tejascaptcha service provider under the providers key in config/app.php.
Register the tejas/tejascaptcha service providers alias under the aliases key in config/app.php.
Configuration
Publish the configuration file
config/tejascaptcha.php
To customize tejas/tejascaptcha's settings run Laravels vendor:publish artisan command from your projects root directory.
Example output:
Type the number associated with tejascaptcha service provider and press enter. An editable copy of tejas/tejascaptcha's config file, tejascaptcha.php, should have been copied to your projects config directory.
Abbreviated default config file:
There are 7 keys in the config file. The config_section_key may point to one
of the four pre-built image representation sections, standard is the default
config_section_key value. You may override this value by setting it to
'flat', 'mini' or 'inverse'. :small_red_triangle:You may also override the
image selection by specifying 'flat', 'mini' or 'inverse'as a post value
of tejascaptchaImageType.
:small_red_triangle:refer to the tejas/tejascaptcha/example/js/tejascaptcha.js
file in the $('#tejas_captcha_refresh_icon') click function.
The audio key specifies the audio files name prefix.
Example Usage Only
Links
All versions of tejascaptcha with dependencies
ext-gd Version *
laravel/framework Version >=7.9
intervention/image Version >=2.2