Автор Тема: Laravel CAPTCHA  (Прочетена 1106 пъти)

0 Потребители и 1 Гост преглежда(т) тази тема.

howto

  • Sr. Member
  • ****
  • Благодарности
  • -Казани: 44
  • -Получени: 4
  • Публикации: 341
Laravel CAPTCHA
« -: 06 Май 2016, 00:41:36 »
Някой може ли да сподели дали laravel има собсвена CAPTCHA?

Avalanche

  • Administrator
  • Hero Member
  • *****
  • Благодарности
  • -Казани: 65
  • -Получени: 269
  • Публикации: 2595
  • meow
Re: Laravel CAPTCHA
« Отговор #1 -: 06 Май 2016, 00:51:26 »
Какво значи собствена?
Както за много от функциите на фрейма, има си пакети - CAPTCHA и reCAPTCHA
"Компютрите не правят каквото искаме, а каквото им кажем." Ако разбереш какво значи това няма да имаш големи проблеми, нито с никоя ОС, нито език, или софтуер.
Аз не съм програмист между другото!

howto

  • Sr. Member
  • ****
  • Благодарности
  • -Казани: 44
  • -Получени: 4
  • Публикации: 341
Re: Laravel CAPTCHA
« Отговор #2 -: 06 Май 2016, 01:25:50 »
Мерси ава! Избрах си, но възниква грешка... 100% е от мен, но не зная как се прави та може да споменеш и как да пусна този provider:    LaravelCaptcha\Providers\LaravelCaptchaServiceProvider::class, защото ми дава : Class 'LaravelCaptcha\Providers\LaravelCaptchaServiceProvider' not found

HD

  • Administrator
  • Hero Member
  • *****
  • Благодарности
  • -Казани: 208
  • -Получени: 165
  • Публикации: 3077
Re: Laravel CAPTCHA
« Отговор #3 -: 06 Май 2016, 08:57:45 »
Включи ли service provider-a в cofig/аpp.php?

howto

  • Sr. Member
  • ****
  • Благодарности
  • -Казани: 44
  • -Получени: 4
  • Публикации: 341
Re: Laravel CAPTCHA
« Отговор #4 -: 06 Май 2016, 21:27:56 »
Сега ще се опитам не знам.

howto

  • Sr. Member
  • ****
  • Благодарности
  • -Казани: 44
  • -Получени: 4
  • Публикации: 341
Re: Laravel CAPTCHA
« Отговор #5 -: 06 Май 2016, 21:29:39 »
Така изглежда конфигурацията
Код: PHP
  1. <?php
  2.  
  3. return [
  4.  
  5.         /*
  6.         |--------------------------------------------------------------------------
  7.         | Application Debug Mode
  8.         |--------------------------------------------------------------------------
  9.         |
  10.         | When your application is in debug mode, detailed error messages with
  11.         | stack traces will be shown on every error that occurs within your
  12.         | application. If disabled, a simple generic error page is shown.
  13.         |
  14.         */
  15.  
  16.         'debug' => env('APP_DEBUG'),
  17.  
  18.         /*
  19.         |--------------------------------------------------------------------------
  20.         | Application URL
  21.         |--------------------------------------------------------------------------
  22.         |
  23.         | This URL is used by the console to properly generate URLs when using
  24.         | the Artisan command line tool. You should set this to the root of
  25.         | your application so that it is used when running Artisan tasks.
  26.         |
  27.         */
  28.  
  29.         'url' => 'http://localhost',
  30.  
  31.         /*
  32.         |--------------------------------------------------------------------------
  33.         | Application Timezone
  34.         |--------------------------------------------------------------------------
  35.         |
  36.         | Here you may specify the default timezone for your application, which
  37.         | will be used by the PHP date and date-time functions. We have gone
  38.         | ahead and set this to a sensible default for you out of the box.
  39.         |
  40.         */
  41.  
  42.         'timezone' => 'UTC',
  43.  
  44.         /*
  45.         |--------------------------------------------------------------------------
  46.         | Application Locale Configuration
  47.         |--------------------------------------------------------------------------
  48.         |
  49.         | The application locale determines the default locale that will be used
  50.         | by the translation service provider. You are free to set this value
  51.         | to any of the locales which will be supported by the application.
  52.         |
  53.         */
  54.  
  55.         'locale' => 'bg',
  56.  
  57.         /*
  58.         |--------------------------------------------------------------------------
  59.         | Application Fallback Locale
  60.         |--------------------------------------------------------------------------
  61.         |
  62.         | The fallback locale determines the locale to use when the current one
  63.         | is not available. You may change the value to correspond to any of
  64.         | the language folders that are provided through your application.
  65.         |
  66.         */
  67.  
  68.         'fallback_locale' => 'en',
  69.  
  70.         /*
  71.         |--------------------------------------------------------------------------
  72.         | Encryption Key
  73.         |--------------------------------------------------------------------------
  74.         |
  75.         | This key is used by the Illuminate encrypter service and should be set
  76.         | to a random, 32 character string, otherwise these encrypted strings
  77.         | will not be safe. Please do this before deploying an application!
  78.         |
  79.         */
  80.  
  81.         'key' => env('APP_KEY', 'SomeRandomString'),
  82.  
  83.         'cipher' => MCRYPT_RIJNDAEL_128,
  84.  
  85.         /*
  86.         |--------------------------------------------------------------------------
  87.         | Logging Configuration
  88.         |--------------------------------------------------------------------------
  89.         |
  90.         | Here you may configure the log settings for your application. Out of
  91.         | the box, Laravel uses the Monolog PHP logging library. This gives
  92.         | you a variety of powerful log handlers / formatters to utilize.
  93.         |
  94.         | Available Settings: "single", "daily", "syslog", "errorlog"
  95.         |
  96.         */
  97.  
  98.         'log' => 'daily',
  99.  
  100.         /*
  101.         |--------------------------------------------------------------------------
  102.         | Autoloaded Service Providers
  103.         |--------------------------------------------------------------------------
  104.         |
  105.         | The service providers listed here will be automatically loaded on the
  106.         | request to your application. Feel free to add your own services to
  107.         | this array to grant expanded functionality to your applications.
  108.         |
  109.         */
  110.  
  111.         'providers' => [
  112.  
  113.                 /*
  114.                  * Laravel Framework Service Providers...
  115.                  */
  116.                 LaravelCaptcha\Providers\LaravelCaptchaServiceProvider::class,
  117.                 'Illuminate\Foundation\Providers\ArtisanServiceProvider',
  118.                 'Illuminate\Auth\AuthServiceProvider',
  119.                 'Illuminate\Bus\BusServiceProvider',
  120.                 'Illuminate\Cache\CacheServiceProvider',
  121.                 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
  122.                 'Illuminate\Routing\ControllerServiceProvider',
  123.                 'Illuminate\Cookie\CookieServiceProvider',
  124.                 'Illuminate\Database\DatabaseServiceProvider',
  125.                 'Illuminate\Encryption\EncryptionServiceProvider',
  126.                 'Illuminate\Filesystem\FilesystemServiceProvider',
  127.                 'Illuminate\Foundation\Providers\FoundationServiceProvider',
  128.                 'Illuminate\Hashing\HashServiceProvider',
  129.                 'Illuminate\Mail\MailServiceProvider',
  130.                 'Illuminate\Pagination\PaginationServiceProvider',
  131.                 'Illuminate\Pipeline\PipelineServiceProvider',
  132.                 'Illuminate\Queue\QueueServiceProvider',
  133.                 'Illuminate\Redis\RedisServiceProvider',
  134.                 'Illuminate\Auth\Passwords\PasswordResetServiceProvider',
  135.                 'Illuminate\Session\SessionServiceProvider',
  136.                 'Illuminate\Translation\TranslationServiceProvider',
  137.                 'Illuminate\Validation\ValidationServiceProvider',
  138.                 'Illuminate\View\ViewServiceProvider',
  139.  
  140.                 /*
  141.                  * Application Service Providers...
  142.                  */
  143.                 'App\Providers\AppServiceProvider',
  144.                 'App\Providers\BusServiceProvider',
  145.                 'App\Providers\ConfigServiceProvider',
  146.                 'App\Providers\EventServiceProvider',
  147.                 'App\Providers\RouteServiceProvider',
  148.  
  149.         ],
  150.  
  151.         /*
  152.         |--------------------------------------------------------------------------
  153.         | Class Aliases
  154.         |--------------------------------------------------------------------------
  155.         |
  156.         | This array of class aliases will be registered when this application
  157.         | is started. However, feel free to register as many as you wish as
  158.         | the aliases are "lazy" loaded so they don't hinder performance.
  159.         |
  160.         */
  161.  
  162.         'aliases' => [
  163.  
  164.                 'App'       => 'Illuminate\Support\Facades\App',
  165.                 'Artisan'   => 'Illuminate\Support\Facades\Artisan',
  166.                 'Auth'      => 'Illuminate\Support\Facades\Auth',
  167.                 'Blade'     => 'Illuminate\Support\Facades\Blade',
  168.                 'Bus'       => 'Illuminate\Support\Facades\Bus',
  169.                 'Cache'     => 'Illuminate\Support\Facades\Cache',
  170.                 'Config'    => 'Illuminate\Support\Facades\Config',
  171.                 'Cookie'    => 'Illuminate\Support\Facades\Cookie',
  172.                 'Crypt'     => 'Illuminate\Support\Facades\Crypt',
  173.                 'DB'        => 'Illuminate\Support\Facades\DB',
  174.                 'Eloquent'  => 'Illuminate\Database\Eloquent\Model',
  175.                 'Event'     => 'Illuminate\Support\Facades\Event',
  176.                 'File'      => 'Illuminate\Support\Facades\File',
  177.                 'Hash'      => 'Illuminate\Support\Facades\Hash',
  178.                 'Input'     => 'Illuminate\Support\Facades\Input',
  179.                 'Inspiring' => 'Illuminate\Foundation\Inspiring',
  180.                 'Lang'      => 'Illuminate\Support\Facades\Lang',
  181.                 'Log'       => 'Illuminate\Support\Facades\Log',
  182.                 'Mail'      => 'Illuminate\Support\Facades\Mail',
  183.                 'Password'  => 'Illuminate\Support\Facades\Password',
  184.                 'Queue'     => 'Illuminate\Support\Facades\Queue',
  185.                 'Redirect'  => 'Illuminate\Support\Facades\Redirect',
  186.                 'Redis'     => 'Illuminate\Support\Facades\Redis',
  187.                 'Request'   => 'Illuminate\Support\Facades\Request',
  188.                 'Response'  => 'Illuminate\Support\Facades\Response',
  189.                 'Route'     => 'Illuminate\Support\Facades\Route',
  190.                 'Schema'    => 'Illuminate\Support\Facades\Schema',
  191.                 'Session'   => 'Illuminate\Support\Facades\Session',
  192.                 'Storage'   => 'Illuminate\Support\Facades\Storage',
  193.                 'URL'       => 'Illuminate\Support\Facades\URL',
  194.                 'Validator' => 'Illuminate\Support\Facades\Validator',
  195.                 'View'      => 'Illuminate\Support\Facades\View',
  196.  
  197.         ],
  198.  
  199. ];
  200.  
  201.  

HD

  • Administrator
  • Hero Member
  • *****
  • Благодарности
  • -Казани: 208
  • -Получени: 165
  • Публикации: 3077
Re: Laravel CAPTCHA
« Отговор #6 -: 07 Май 2016, 19:37:44 »

howto

  • Sr. Member
  • ****
  • Благодарности
  • -Казани: 44
  • -Получени: 4
  • Публикации: 341
Re: Laravel CAPTCHA
« Отговор #7 -: 08 Май 2016, 11:17:31 »
Избрах една и я интегрирах, но много бъгава и сега си я оправих малко! Има още какво да се желае, но като цяло всичко работи.