Skip to content

Update README.md for Laravel UI#54

Merged
DarkGhostHunter merged 2 commits intoLaragear:1.xfrom
jonathan-bird:patch-1
Jul 24, 2023
Merged

Update README.md for Laravel UI#54
DarkGhostHunter merged 2 commits intoLaragear:1.xfrom
jonathan-bird:patch-1

Conversation

@jonathan-bird
Copy link
Copy Markdown
Contributor

Description

This readme updates provides more details to someone overriding in Laravel UI.

Code samples

For example, in Laravel UI, a basic example in the LoginController would be:

protected function validateLogin(Request $request)
{
    // If the user is trying for the first time, ensure both email and the password are
    // required to log in. If it's not, then he would issue its 2FA code. This ensures
    // the credentials are not required again when is just issuing his 2FA code alone.
    if ($request->isNotFilled('2fa_code')) {
        $request->validate([
            'email' => 'required|email',
            'password' => 'required|string'
        ]);
    }
}

protected function attemptLogin(Request $request)
{
    return Auth2FA::attempt($this->credentials($request), $request->filled('remember'));
}

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 24, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (0e3949e) 99.75% compared to head (b175218) 99.75%.

Additional details and impacted files
@@            Coverage Diff            @@
##                1.x      #54   +/-   ##
=========================================
  Coverage     99.75%   99.75%           
  Complexity      140      140           
=========================================
  Files            18       18           
  Lines           408      408           
=========================================
  Hits            407      407           
  Misses            1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DarkGhostHunter DarkGhostHunter merged commit cf00ad7 into Laragear:1.x Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants