-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
871 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace Bkwld\Decoy\Controllers; | ||
|
||
use Auth; | ||
use Decoy; | ||
use Former; | ||
use Illuminate\Support\Str; | ||
use Illuminate\Http\Request; | ||
use Bkwld\Decoy\Models\Admin; | ||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails; | ||
|
||
class ForgotPassword extends Base | ||
{ | ||
|
||
use SendsPasswordResetEmails; | ||
|
||
/** | ||
* Display the form to request a password reset link. | ||
* | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function showLinkRequestForm() | ||
{ | ||
// Pass validation rules | ||
Former::withRules([ | ||
'email' => 'required|email', | ||
]); | ||
|
||
// Set the breadcrumbs | ||
app('decoy.breadcrumbs')->set([ | ||
route('decoy::account@login') => 'Login', | ||
url()->current() => 'Forgot Password', | ||
]); | ||
|
||
// Show the page | ||
$this->title = 'Forgot Password'; | ||
$this->description = 'You know the drill.'; | ||
|
||
return $this->populateView('decoy::account.forgot'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace Bkwld\Decoy\Notifications; | ||
|
||
// Deps | ||
use Decoy; | ||
use Illuminate\Auth\Notifications\ResetPassword as LaravelResetPassword; | ||
use Illuminate\Notifications\Messages\MailMessage; | ||
|
||
/** | ||
* Subclass the Laravel reset password so we can send admin to the /admin | ||
*/ | ||
class ResetPassword extends LaravelResetPassword | ||
{ | ||
|
||
/** | ||
* Build the mail representation of the notification. | ||
* | ||
* @param mixed $notifiable | ||
* @return \Illuminate\Notifications\Messages\MailMessage | ||
*/ | ||
public function toMail($notifiable) | ||
{ | ||
// Make the URL | ||
$dir = config('decoy.core.dir'); | ||
$url = url($dir.'/password/reset', $this->token); | ||
|
||
// Send the message | ||
return (new MailMessage) | ||
->subject('Recover access to '.Decoy::site()) | ||
->line('You are receiving this email because we received a password reset request for your account.') | ||
->action('Reset Password', $url) | ||
->line('If you did not request a password reset, no further action is required.'); | ||
} | ||
|
||
} |
Oops, something went wrong.