Fucah Logo Fucah Consult

Do the following in your request

function rules() {

if (config('app.env') == 'production') {

return [

           'email' => 'required|email',

           'password' => 'required',

          'g-recaptcha-response' => 'required|captcha'

   ];

}

return [

          'email' => 'required|email',

          'password' => 'required',

     ];

}

 

And set APP_ENV=local in localhost and APP_ENV=production on your server

1. Wrape the code below around your Google Analytics code

 

@if (config('app.env') == 'production')

 

/** Put Google Analytics Code Here*/


@endif

 

2. Update your .env file. Set APP_ENV=local in localhost and on your server, use APP_ENV=production

That is all