manshu

at Freelance

Member Since 4 Years Ago

Vienna, VA

Experience Points
114,155
Total
Experience

845 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
1133
Lessons
Completed
Best Reply Awards
1
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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 23
114,155 XP
Feb
08
2 weeks ago
Activity icon

Started a new Conversation Pipedrive CRM API

Here the video, i did just to show how pipedrive crm works. Feel free to check it out.

https://www.youtube.com/watch?v=quGe06hnhnM

https://www.youtube.com/watch?v=BH95Wz9dwns

I was searching for a solution on how to make it work without doing full OAuth and found nice package to go along with it.

Dec
29
1 month ago
Activity icon

Started a new Conversation Deploying NextJS Application On Laravel Forge

I was searching for long time on easy deployment of NextJS projects on laravel forge. Finally found an answer. If you are looking to deploy your NextJS as frontend project, and Laravel as backend. Here is a quick guide to add your project on laravel forge.

https://www.youtube.com/watch?v=JJmbPQSgx4U

Dec
24
2 months ago
Activity icon

Started a new Conversation Deploying NuxtJS Project On Laravel Forge

I was searching for long time on easy deployment of NuxtJS projects on laravel forge. Finally found an answer. If you are looking to deploy your NuxtJS as frontend project, and Laravel as backend. Here is a quick guide to add your project on laravel forge.

https://www.youtube.com/watch?v=QYCLbNxojh4

Dec
01
2 months ago
Activity icon

Replied to Creating User For API Giving Error

No, this is perfect. I totally forgot about the raw() function. thanks @tisuchi @goldtaste @nakov @bugsysha

Activity icon

Replied to Creating User For API Giving Error

Yess !!!! raw() function worked. Thanks guys. I totally forgot about that.

Activity icon

Replied to Creating User For API Giving Error

My test

     
  /** @test */
    public function it_registers_new_user_using_api()
    {
        $this->withoutExceptionHandling();
        //Given
        $user = factory(User::class)->create()->toArray();
        //When
        $response = $this->postJson('/api/register', $user);
        //Then
        $response->assertStatus(201);
    }

My factory

$factory->define(User::class, function (Faker $faker) {
    return [
        'name' => $faker->name,
        'email' => $faker->unique()->safeEmail,
        'password' => 'yIXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
   
    ];
});

My controller


    public function store(Request $request)
    {
        $this->validate($request, [
            "name" => 'required',
            "email" => 'email|required|unique:users,email',
            "password" => 'required',
        ]);


        $user = User::create([
            'name' => $request->name,
            'email' => $request->email,
            'password' => bcrypt($request->password),
        ]);

        return response()->json([
            "status" => "Success"
        ], 201);
        
Activity icon

Replied to Creating User For API Giving Error

Nope. Simple Create User Test isn't working. Idk what im doing wrong. I keep getting 422 error for invalid data.

Activity icon

Replied to Creating User For API Giving Error

It work via postman. I am not able to pass the testcase. @tisuchi @bugsysha

Activity icon

Replied to Creating User For API Giving Error

After i removed that, i am getting following errors.

There was 1 error:

1) Tests\Feature\API\Users\UsersFeatureTest::it_registers_new_user_using_api
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: users.email (SQL: insert into "users" ("name", "email", "password", "updated_at", "created_at") values (Dameon Reinger MD, [email protected], y$zjDqfWrC.5xFVIXWC05TAeM8kYDbxwG9g3t30en0Zi70d/w41HoTa, 2019-12-01 17:59:50, 2019-12-01 17:59:50))
Activity icon

Replied to Creating User For API Giving Error

If i remove validation, how i validate user data?

Activity icon

Replied to Creating User For API Giving Error

Here you go @tisuchi


    public function store(Request $request)
    {
        $this->validate($request, [
            "name" => 'required',
            "email" => 'email|required|unique:users,email',
            "password" => 'required',
        ]);


        $user = User::create([
            'name' => $request->name,
            'email' => $request->email,
            'password' => bcrypt($request->password),
        ]);

        return response()->json([
            "status" => "Success"
        ], 201);
        
    }

Activity icon

Replied to Creating User For API Giving Error

@tisuchi Nope doesn't work. It's redirecting from that page automatically.

Expected status code 201 but received 302.
Failed asserting that false is true.
Activity icon

Started a new Conversation Creating User For API Giving Error

Here's my User Registration Test. I am using default UserFactory.php to create user. I am getting the following error.

Illuminate\Validation\ValidationException: The given data was invalid.

<?php

namespace Tests\Feature\API\Users;

use Tests\TestCase;
use WebApp\Domain\Users\User;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;

class UsersFeatureTest extends TestCase
{
    
    use RefreshDatabase;

    /** @test */
    public function it_registers_new_user_using_api()
    {
        $this->withoutExceptionHandling();
        //Given
        $user = factory(User::class)->create()->toArray();
        //When
        $response = $this->post('/api/register', $user);
        //Then
        $response->assertStatus(201);
    }

}

Sep
05
5 months ago
Activity icon

Commented on Frontend Scaffolding Has Been Moved To Laravel UI

This is great separation of duties. Thanks for this clean way of managing things. It was much needed feature, because i started leveraging nuxtjs and reactjs for frontend.