VikramB

VikramB

Member Since 1 Year Ago

Sydney

Software Architect at Sydney

Experience Points 12,930
Experience Level 3

2,070 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 125
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.

17 Apr
1 month ago

VikramB left a reply on Spark And Existing Laravel Project

I am running into the same situation, have ploughed deep into my existing Laravel Project and don't know what's in store if I have to copy over on a Spark application

Has anyone done it successfully and documented the steps to do it ?

28 Mar
1 month ago

VikramB left a reply on Favorite A Reply Results In Failed Test

@SIANGBOON - It was episode 18. I wasn't too sure why it didn't work. But I now have it working Favorite::create because of mass exception error, which it didn't throw instead gave me count of 0 when I fetched the count through Favorite::all() it's now sorted

VikramB left a reply on Favorite A Reply Results In Failed Test

Figured out what's causing that issue its the mass assignment issue in my model

Favorite.php

   protected $guarded = [];

This removed the error.

27 Mar
1 month ago

VikramB started a new conversation Favorite A Reply Results In Failed Test

Following Jeffrey's Build a Forum tutorials results in failed test

PHPUnit 8.0.5 by Sebastian Bergmann and contributors.

.F                                                                  2 / 2 (100%)

Time: 347 ms, Memory: 28.00 MB

There was 1 failure:

1) Tests\Feature\FavoritesTest::an_authenticated_user_can_favorite_any_reply
Failed asserting that actual size 0 matches expected size 1.

The test is as follows

/** @test */

    public function an_authenticated_user_can_favorite_any_reply()
    {
        $this->signIn();

        $reply = create('App\Reply');

        $this->post('replies/' . $reply->id . '/favorites');

        $this->assertCount(1, $reply->favorites);
    }

web.php is as follows

Route::post('replies/{reply}/favorites', '[email protected]');

And in the controller is the store method as below

FavoritesController.php


    public function store(Reply $reply)
   {

     Favorite::create([
            'user_id' => auth()->user()->id,
            'favorited_id' => $reply->id,
            'favorited' => get_class($reply)
        ]);       

   }

When I dd the Favorite::all() in the test after the post I create blank array. What could I possibly be doing wrong ?

16 Mar
2 months ago

VikramB left a reply on Add Captcha Dynamically On Login Failure

@STEREOH - This is on the view level, I am interested in the validation at the controller or probably FormRequest level, where do the additional form validation for the recaptcha when a login failure happens.

I am not sure of how to stitch them together to show a recaptcha field in the view, check additional validation at the controller or form object and possibly doing some model checks too.

12 Mar
2 months ago

VikramB left a reply on Add Captcha Dynamically On Login Failure

@WILK_RANDALL - I don't intend to throttle requests instead go the captcha way

10 Mar
2 months ago

VikramB left a reply on Add Captcha Dynamically On Login Failure

@SNAPEY - I don't want to send a captcha request straight away, want to defend bots from spurious requests. Maybe I want to implement it after 2 tries.

VikramB started a new conversation Add Captcha Dynamically On Login Failure

I have added a package biscolab/laravel-recaptcha to show captcha on login failure.

I tried to modify the default routes to customise but don't know a way to do so

protected function sendFailedLoginResponse(Request $request) {
    return back()->withErrors(['email' => 'Credentials do not match, try again']);
    // Need to validate subsequent login with additional re-captcha rule
}

Assuming I have a LoginRequest.php

public function rules() {
    return [
            'firstname' => 'required',
            'lastname' => 'required',
            'email' => 'required|email',
            'password' => 'required|confirmed|min:6',
            'g-recaptcha-response' => 'recaptcha',
        ];
}

which does the validation during the next login I want to be able to add

'g-recaptcha-response' => 'recaptcha',

dynamically. What is the best approach to do so I don't have a proper thread which talks about validation on laravel adequately.

23 Nov
6 months ago

VikramB left a reply on Create Nova User On Custom User Table

I did and it has created a events table so the migration and installation was fine. I am able to login to nova dashboard if logged in as a user, but unable to create a nova user through the command due to the fact that my User table has additional fields

22 Nov
6 months ago

VikramB started a new conversation Create Nova User On Custom User Table

When I try to create my first nova user using

php artisan nova:user on my User table having an additional name field, nova squawks with an error

Column not found: 1054 Unknown column 'name' in 'field list'

How and where would I have to tell Nova that my User table has additional fields. Is there a migration for the nova:user that lets me customize ?

07 Nov
6 months ago

VikramB left a reply on Laracasts New Layout Is Awesome.

The layout is cool. Can you tell us the tech or libraries involved / imported in building the parts of the website. For example. Discussions Forums and the Series / Browse.

15 Oct
7 months ago

VikramB left a reply on Custom Implement Auth::routes(['verify' => True])

Turned out there were a few things that were missing

'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, in the Kernel.php

Also I had weird behaviour there was a @yield('contents') which was causing a trouble in my app.blade.php into the verify.blade.php to render the content in the @section('contents') I had to change it to @section('content') not sure why but that worked.

07 Oct
7 months ago

VikramB left a reply on Custom Implement Auth::routes(['verify' => True])

I do not have information being logged when the redirection happens. It's blank.

04 Oct
7 months ago

VikramB left a reply on Custom Implement Auth::routes(['verify' => True])

That was a typo the url is /email/verify it still doesn't render anything

28 Sep
7 months ago

VikramB left a reply on Custom Implement Auth::routes(['verify' => True])

I have tried a few things

User.php

class User extends Authenticatable implements MustVerifyEmail
{
    use Notifiable;

    // ...
}

Added custom email routes in web.php

// Email Verification Routes...
Route::get('/email/verify', 'Auth\[email protected]')->name('verification.notice');
Route::get('/email/verify/{id}', 'Auth\[email protected]')->name('verification.verify');
Route::get('/email/resend', 'Auth\[email protected]')->name('verification.resend');

In Http\Kernel.php

protected $routeMiddleware = [
...
 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
]

In the EventServiceProvider.php

        Registered::class => [
            SendEmailVerificationNotification::class,
        ],
    ];

Added the resources/views/auth/verify.blade.php

And finally secured the routes via middleware

Route::get('/', '[email protected]')->name('home')->middleware('verified');

Now when I register a new user and navigate to home the url changes to http://localhost:8000/verify/email however the contents of the page is blank and not the ones in the verify.blade.php

27 Sep
7 months ago

VikramB left a reply on Custom Implement Auth::routes(['verify' => True])

Can someone help answer me please ?

24 Sep
8 months ago

VikramB started a new conversation Custom Implement Auth::routes(['verify' => True])

I need to know how to custom implement the Laravel 5.7 functionality to verify user account creation if the application doesn't have Auth::routes(); initially and all the routes in web.php have been custom implemented ?

14 Feb
1 year ago

VikramB started a new conversation Stripe Integration Question

In the chapter

https://laracasts.com/series/how-to-accept-payments-with-stripe/episodes/4

I would like to know in the line

$product = Product::findOrFail(request('product'))

Where is the value request('product') being passed when the form is submitted?

Can someone share light on how this is done?

VikramB left a reply on Subscription Rates Increased?

Sure, I'll close this thread and create one with my question. Thank you for the patience.

VikramB left a reply on Subscription Rates Increased?

Sure. What's the best way to get answers to question related to a series ? I have a question here in the forum below

https://laracasts.com/series/how-to-accept-payments-with-stripe/episodes/4

I haven't got an answer in a while. Can somebody respond please?

VikramB started a new conversation Subscription Rates Increased?

I see a subscription plan which mentions $15 mentioned on the home screen whereas I am on a current plan of $9. Wanted to know if the plans would become increase to the mentioned value.