datamonster

datamonster

Member Since 2 Years Ago

Experience Points 8,830
Experience Level 2

1,170 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 86
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

04 Jan
5 months ago

datamonster left a reply on PHPStorm - Which Theme Do You Use?

@BLUESCREENJUNKY - Can you share you theme settings ?

22 Dec
1 year ago

datamonster left a reply on Call To Undefined Method App\Console\Kernel::load()

cleaning up vendor folder and installing composer does the job for me

19 Apr
2 years ago

datamonster left a reply on Mock Response During Dusk Testing

because I am running test from command line that's why it's just my thinking and this isn't working i need something like this :

if ($this->app->environment('local', 'testing') && is_dusk_test) {
            $this->app->bind(Amazon::class, function ($app) use ($object) {
        // attach mock response via guzzle
        // and return object
                return $object;
            });

        }

datamonster left a reply on Mock Response During Dusk Testing

I have made my own SeriveProvider that returns me the Object of that class I do something like this

public function register()
    {
        $lister = new ListMarketplaceParticipations([
        ...config items here....         
]);
        if ($this->app->environment('local', 'testing') && 'cli' === php_sapi_name()) {
            $this->app->bind(Amazon::class, function ($app) use ($object) {
        // attach mock response via guzzle
        // and return object
                return $object;
            });

        } else {
            $this->app->bind(Amazon::class, function ($app) use ($object) {
                return $object;
            });
        }
    }

But issue is with PHP_SAPI it returns fpm-fcgi because i run on vagrant and it's browser that executes the Dusk test. I need something on the basis of which i can make this code get work

datamonster started a new conversation Mock Response

Hi,

I have the following situation:

1- I have customized Laravel auth register according to my own needs (used Vue and perfomed register process in steps.)

2- During register process I send Request to Amazon

3- I want to generate a mock amazon response during Dusk tests so that Actual API call won't send.

How to achieve this any idea ?

18 Apr
2 years ago

datamonster started a new conversation Laravel Dusk Testting - Old Template Files Are Shown

Hi, I've customized registration process and now testing via Laravel dusk. It was working fine then suddenly my tests are failing and when i noticed the screenshots i came to know that it's showing old templates (blade) while I've made many changes in view files.

I've tried php artisan config:clear, php artisan cache:clear, route:cache and many more artisan commands to clear things.

Any idea why this weired behaviour ?

20 Jan
2 years ago

datamonster left a reply on How To Create A Custom Registration Page For Two Step Registration Of A User?

Yes, I'm off course using Auth; at the top, and even

    dd(Auth::user());

is returning null

19 Jan
2 years ago

datamonster left a reply on How To Create A Custom Registration Page For Two Step Registration Of A User?

I have already tried this after saving the values to both tables in database: $auth = new Auth(); $auth = Auth::login($user); dd($auth);

And it's returning "Null".

datamonster started a new conversation How To Create A Custom Registration Page For Two Step Registration Of A User?

Hi, everyone! I am working on Ubuntu 16.04LTS and having an environment of vagrant homestead with PHP 7.0 and Laravel 5.3. I have to create a two step registration process for a user. For example on the first page of the form the user will provide his name, email and password like the default registration page and there will be a button of "Next" which will lead to a second form and these fields will be passed on to that second form as hidden fields. From here after completing the second form the user will click on the "Register" button and this will add the first form details to the Users table in the default user migration, while the form filled on the second page will add all of those details to a different table including this currently created user's user_id so that later on we can have an eloquent relationship between both of these tables.

What I have done is that I have create a new controller where I'm having constructor that will allow this custom signup page and the second form page as exception. Then there will be a form which is a copy of the default registration page and this signup form will submit the values which a method in controller called "Signup" will handle and it will accept all of these values and pass them on to the second form and in the second form I'm fetching all of these values in hidden input fields. Then in the same custom controller I got another method called "create" this method is handling all the requests received in through this form. Then first I'm saving all of these fields into relevant variables and later I'm creating a new User instance like this:

    $name = $request->name;
    $email = $request->email;
    $password = $request->password;

    $user = new User();
    $user->name = $name;
    $user->email = $email;
    $user->password = bcrypt($password);

And now once this user is created in the database I'm storing the other fields of the second form into relevant variables just like above example and later on I'm creating a new instance for the other migration where I want to save the values in the second_form table.

Now so far, everything is working fine and all of the values are being stored in the database. The problem comes here that once the user clicks on the "Register" button he is directed to the newly created welcome page, but he is still not logged in. He needs to login again from the above given login link (I have only changed the default Register to Signup and left the "Login" as it is).

Can anyone guide me if there is any other way or best practice through which I can achieve the same objective of two step registration form?

Regards, Mohsin.