swimmer

swimmer

Member Since 1 Year Ago

Experience Points
6,660
Total
Experience

3,340 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 2
6,660 XP
Sep
21
4 days ago
Activity icon

Replied to NoCaptcha Whitespace

@automica

Thank you for your suggestions

If you look what I wrote in my original post that’s exactly the two strategies I tried however with no success.

Were you able to look at how I tried to style it?

Activity icon

Started a new Conversation NoCaptcha Whitespace

I am using the following package for NoCaptcha https://packagist.org/packages/anhskohbo/no-captcha

I want to make a line space between the “I am not a not a robot” to the submit button.

However I am not able to do so.

I tried the following 2 methods:

1.I added a DIV

 <div class="captcha">

            <br>
            <br>
            <br>
            {!! Anhskohbo\NoCaptcha\Facades\NoCaptcha::display() !!}
            <br>
            <br>
            <br>
          </div>

For the class I tried

.captcha {
    margin-top: 25px;
    margin-bottom: 50px;
    padding-bottom: 50px;
    padding-top: 50px;
}

2)The package creates a #rc-anchor-container for the captcha I tried

#rc-anchor-container {
    margin-top: 25px;
    margin-bottom: 50px;
    padding-bottom: 50px;
    padding-top: 50px;
}

Both methods did not add white spaces.

At the following link you can find a picture how it currently looks like

https://drive.google.com/file/d/19xNl2MbL9YTMz7FA0GTajzEs0Q_dpoRq/view?usp=sharing

Activity icon

Replied to What Is Causing The Issue From This Error If It Is The Password Or Username?

@sinnbeck

Thank you for your help. I was able to solve the issue. All I had to do is change my password from the cpanel and it worked.

Activity icon

Replied to What Is Causing The Issue From This Error If It Is The Password Or Username?

The databases is from the same server.

Also I don’t understand your answer how can I know if the issue is the password or the connectivity to the database.

Activity icon

Replied to What Is Causing The Issue From This Error If It Is The Password Or Username?

@sinnbeck I already have DB 127.0.0.1 set up.

Is there a way I can check if the issue is that it cannot find the database? Or maybe there is a way to know that the issue is just the password.

If I’m able to troubleshoot which of the two is causing the issue it will make it easier for me to figure it out.

Activity icon

Replied to What Is Causing The Issue From This Error If It Is The Password Or Username?

@sinnbeck I am using the a live server that has cPanel install on it.

Activity icon

Replied to What Is Causing The Issue From This Error If It Is The Password Or Username?

@sinnbeck I am using MYSQL

I do not know how to connect outside of Laravel.

Activity icon

Replied to Looking For A Recommendation For A No-captcha For Laravel 7

@ismaile @snapey I just three uploaded the project to my Cpanel and everything is to work smooth.

Thank you all for your help

Activity icon

Started a new Conversation What Is Causing The Issue From This Error If It Is The Password Or Username?

I am getting the following error while trying to submit information to the database.

SQLSTATE[HY000] [1045] Access denied for user 'cdfw2347_landing'@'localhost' (using password: YES) (SQL: select count(*) as aggregate from suppliers where email = [email protected])

I checked my env file and it seems my password and username are correct.

Is there any way I can know what is causing the issue from this error If it is the password or username?

Sep
17
1 week ago
Activity icon

Replied to Looking For A Recommendation For A No-captcha For Laravel 7

@snapey I don’t understand why you think I installed without composer I installed and then uninstalled it and installed it again with composer

Activity icon

Replied to Looking For A Recommendation For A No-captcha For Laravel 7

@ismaile

Hi,

This is my composer.json file


{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.2.5",
        "anhskohbo/no-captcha": "^3.3",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^6.3",
        "laravel/framework": "^7.24",
        "laravel/tinker": "^2.0"
    },
    "require-dev": {
        "facade/ignition": "^2.0",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^4.1",
        "phpunit/phpunit": "^8.5"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

In vendor directory, anhskohbo/no-captcha did not exist. I manually uploaded and added file.

I do not understand why it didn’t exist. However even after adding it I am still encountering the same issue.

Activity icon

Replied to Looking For A Recommendation For A No-captcha For Laravel 7

I made a video showing were I installed the script. You can find it at the following link: https://drive.google.com/file/d/1wtGD9pEghLbQR14TOguB6jX3f1z9cQfV/view?usp=sharing

Let me know if I missed a step

I do not have in the video the secret key for INV and the setup step as the instructions say it’s not for Laravel 7.

Thank you for your help.

Activity icon

Replied to Looking For A Recommendation For A No-captcha For Laravel 7

When I do

php artisan vendor:publish --provider="Anhskohbo\NoCaptcha\NoCaptchaServiceProvider"

I get the following error “Unable to locate publishable resources.”

I am thinking that this might has to do with not doing the set up step.

As it says on the instructions:

NOTE This package supports the auto-discovery feature of Laravel 5.5 and above, So skip these Setup instructions if you're using Laravel 5.5 and above.

And I am using Laravel 7

Activity icon

Replied to Looking For A Recommendation For A No-captcha For Laravel 7

@ismaile I made those changes and got the following error. Class 'Anhskohbo\NoCaptcha\Facades\NoCaptcha' not found (View: /home/ /supplier_landing/resources/views/form/contact_us.blade.php) Now what?

Activity icon

Replied to Looking For A Recommendation For A No-captcha For Laravel 7

@ismaile

I just made those updates however I am getting the same errors.

Activity icon

Replied to Looking For A Recommendation For A No-captcha For Laravel 7

@ismaile

I went by your recommendations and I imported to the blade.

<div>
            {!! NoCaptcha::display() !!}
          </div>

I also made an import for the controller for the following

use Illuminate\Support\Facades\Validator;

however I get the following error message.

“Class 'NoCaptcha' not found”

What am I doing wrong?

Sep
16
1 week ago
Activity icon

Replied to Looking For A Recommendation For A No-captcha For Laravel 7

@ismaile

I decided to use the anhskohbo/no-captcha package.

From the following link: https://packagist.org/packages/anhskohbo/no-captcha\

What is unclear to me is:

  1. Init js source With default options : {!! NoCaptcha::renderJs() !!}

Can I put this in my JavaScript file for the site?

2)I need to add

  1. $validate = Validator::make(Input::all(), [ 'g-recaptcha-response' => 'required|captcha' ]);

The way my code is built that I have a request validator at Request ->ContactFromRequst

Should I put it there? What currently I have in the form is

<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use App\Supplier;

class ContactFromRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'contact_name' => 'required|min:2|max:200',
            'company' => 'required|min:2|max:200',
            'address' => 'required|min:5|max:200',
            'email' => 'required|email|unique:suppliers,email',
            'phone' => 'required|min:4|max:25',

        ];
    }
}

Do I need to add any use for the package as well?

Sep
15
1 week ago
Activity icon

Replied to Looking For A Recommendation For A No-captcha For Laravel 7

@ismaile

Any video on youtube showing how use these packages?

Activity icon

Replied to Pop-up Not 350 On 350

I found the solution .banner img{ height:700px !important; }

Thank you for your help

Activity icon

Replied to I Am Trying To Create A Project In Laravel In Cpnel

I found my issue. The server had installed PHP 5.6

Activity icon

Started a new Conversation Looking For A Recommendation For A No-captcha For Laravel 7

Looking for a recommendation for a no-captcha for Laravel 7. For google v2 where the user needs to click a button that he is not a robot.

Package needs to have good documentation and if possible a video on YouTube showing how to use it.

Sep
11
2 weeks ago
Activity icon

Replied to I Am Trying To Create A Project In Laravel In Cpnel

No, My env is not is not their it is in the where my vendor file is in supplier_landing folder which is not publicly.

What should I do to link to .inv?

Sep
10
2 weeks ago
Activity icon

Started a new Conversation I Am Trying To Create A Project In Laravel In Cpnel

I am trying to create a project in Laravel in cpnel

My index file is public_html/supplier_landing/index.php

my vendor file is in: supplier_landing/vendor

I have the following setting on my index file


require __DIR__.'/../../supplier_landing/vendor/autoload.php';

$app = require_once __DIR__.'/../../supplier_landing/bootstrap/app.php';

However my application is not working I am getting blank screen.

What am I doing wrong?

Sep
09
2 weeks ago
Activity icon

Replied to Pop-up Not 350 On 350

@sinnbeck

I did according to your recommendations however it caused issues on the site

1)Some of the links became not clickable. 2) I want it to have a margin from the top.

Attached is a video showing the issues:

https://drive.google.com/file/d/1i5ghpXuYPhl_yoG32Cpfmi9cMJDRWbil/view?usp=sharing

For now I canceled that part of the CSS file.

Activity icon

Replied to Pop-up Not 350 On 350

@sinnbeck @automica

I made the changes and the width changed.

But what I want to do is the popup will not move all the HTML down but be like another layer.

At the following link you can see how the pop-up looks at a different website and that’s the way I want it to look https://drive.google.com/file/d/1JCnFoxLPsnOOq4jXbNR7pDsKnlDNq9Tw/view?usp=sharing

Activity icon

Replied to I Get The Relative Link Not Full Link

@automica @sinnbeck @ismaile

I think it is escaping issue because of VSCODE

At the following link you can find how it looks on my vscode editor.

https://drive.google.com/file/d/1XLSVzD4sqqTfnl9G0yTNauhh4qFHFlZx/view?usp=sharing

Activity icon

Replied to I Get The Relative Link Not Full Link

@automica @ismaile This is my scapeing issue

  <a onclick='window.open("https://www.google.com")' ><img src="suppliers_landing_page/images/logo1.png"  width="400" height="93" alt="" /></a>
Activity icon

Replied to Pop-up Not 350 On 350

@automica Hi,

I added the width: 350px; margin: 0 auto;

to #supplier_popup .banner_350_350

Still not working properly. What am I doing wrong?

Activity icon

Replied to Pop-up Not 350 On 350

@automica Just changed it to 350 on 350.

Still not working properly.

What am I doing wrong?

Activity icon

Started a new Conversation Pop-up Not 350 On 350

I am trying to create a pop-up which works only for suppliers. And only if they have in their local storage.

localStorage.setItem('do_supplier_popup', 'yes');

Our web site address is

I only want the “popup” to appear in a 350 on 350 length.

Currently it is on the full length of the site.

What am I doing wrong?

You can find my CSS at the following link:

The JS

and the HTML relevant to the popup at

https://codepen.io/swimmer11/pen/PoNQmKN

In order to view the pop-up you need to put into your console localStorage.setItem('do_supplier_popup', 'yes');

Sep
08
2 weeks ago
Activity icon

Replied to I Get The Relative Link Not Full Link

@ismaile I decided to use JS onclick='window.open("htpps://www.google.com")' And together with what you wrote it is causing issues of escaping.

How do I solve this?

Activity icon

Started a new Conversation I Get The Relative Link Not Full Link

In Blade template When using a

I get the relative link http://localhost:3030/www.Google.com

I would like to go directly to Google.

What is causing this issue?

Jun
25
3 months ago
Activity icon

Replied to Assertions Test That Stop

@michaloravec

I actually don’t want it trigger anything I just want to go to the next test.

How can this be done?

Activity icon

Replied to Assertions Test That Stop

@michaloravec Can I do

 try {

       public function test1()

}

That way it will work on the whole function?

Activity icon

Replied to Selector Does Not Exist

I found my mistake

The attribute for Dusk and the HTML was not the same.

Activity icon

Started a new Conversation Selector Does Not Exist

I am trying to click on the following JS selector


<button class="btn blue btn-primary" data-pa-name="login">Log In</button>

When I use with Laravel Dusk


$browser->click('[data-vv-name="login"]');

It is telling me that no such selector exists however it does. What am I doing wrong?

Jun
24
3 months ago
Activity icon

Replied to Not Printing HTML In Blade

@michaloravec

Works thank you

Activity icon

Started a new Conversation Not Printing HTML In Blade

I have the following variable

   $body_sentence = 'We looped through'.$this->counter_run.'pages of items <br> and successfully updated all item information';

That I pass to a Balde view And in the blade view I print it out with

   <p>{{$body_sentence}}</p>

it prints the as text not html.

What do I do to make it printed as HTML?

Jun
21
3 months ago
Activity icon

Replied to Bat File Not Running

I tried that

For some reason calling

Artisan::call('dusk --filter test10');

Does not work. Dusk can not be called with the Artisan::call method

Activity icon

Replied to Bat File Not Running

I finally got it to work with

 exec("c:\WINDOWS\system32\cmd.exe /c START ".$bat_path);

@snapey

The reason I am using a bat file as I am storing in the bat file the following command php artisan dusk --filter test10

I was not able to call dusk with other methods.

How would you suggest I do this on Linux?

Thank you for your help.

Jun
20
3 months ago
Activity icon

Replied to Bat File Not Running

It is still not working

When I try

   exec("cmd.exe /c ".$bat_path);

in the debug console in xdebug I get the following

""

Activity icon

Replied to Bat File Not Running

@michaloravec @snapey

I am using Windows

My file command is stored at the following path $bat_path

How do you suggest I run it?

Activity icon

Replied to Bat File Not Running

@jlrdw

Thank you for the tip. However as for your recommendation I tried the following command

 exec("cmd.exe /c".$bat_path);

And got the following error

“is not recognized as an internal or external command, operable program or batch file”

What am I doing wrong?

I also tried to run the command directly with

exec("cmd.exe /c".$bat);

And it did not work

Jun
19
3 months ago
Activity icon

Started a new Conversation Bat File Not Running

I have a bat file saved at the following path $bat_path

I’m trying to get PHP Laravel to run it

I tried the following but it’s not working

exec($bat_path);

What am I doing wrong?

Jun
16
3 months ago
Activity icon

Started a new Conversation How To Check Of Checkboxes Is Clicked In The Blade Template

I have the following checkbox in my blade form.

 <div class="col-md-auto">
            
            <div class="form-check">
            <input class="form-check-input" type="checkbox" value="" id="{{$content['siteName']}}">
              <label class="form-check-label" for="defaultCheck1">
                {{$content['siteName']}}
              </label>
            </div>
          </div>


How can I check via the request if the checkbox is checked? Do I have to use JavaScript to change on attribute for the checkbox?

Is there another way?

Activity icon

Replied to Use Artisan From Route

@michaloravec

I was thinking about your answer.

Wouldn’t it be easier just to build in the controller The following? public function test7() { shell_exec('php artisan dusk --filter test7'); }

Activity icon

Started a new Conversation We Need A JS File In PHP Created By VB

I am trying to automate clicks on the website which is not mine. I am using Laravel Dusk for the task with the following commands

  $path_js = public_path()."/js/insert_item_info.js";
                   
       $js = file_get_contents($path_js)
   $browser->script($js); 

With the command

browser->script($js); 

I am injecting JS in the frontend of the site. I am creating the JS with on export from our inventory management system with is written in VB. If I tell PHP to directly read the JS file that was created by VB. Once Dusk runs with browser->script($js); there is an error and everything crashes. If after the JS is created I copy and paste it from the file created by VB to the file stored in Laravel. “insert_item_info.js”

It works fine.

I’m guessing the issue is that is when VB is creating the file it is writing something wrong in the file making it unreadable by PHP.

How can I checked out what is wrong with the file ? You can find the sample problematic file at the following link:

https://drive.google.com/file/d/1497A3b8Fh8Q541UCXJX-TIN6Iu436qP_/view?usp=sharing