PHP code example of creode / laravel-account-approval
1. Go to this page and download the library: Download creode/laravel-account-approval library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
creode / laravel-account-approval example snippets
namespace App\Http\Middleware;
use Closure;
use Creode\LaravelAccountApproval\Http\Middleware\AccountActivated as BaseAccountActivated;
class AccountActivated extends BaseAccountActivated
{
/**
* Handle a failed activation.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
protected function accountNotActivated(Request $request, Closure $next)
{
// Your custom functionality here
}
/**
* Redirect which will happen if the user is not activated.
*
* Return null to continue with the request.
*
* @param Request $request
* @param Closure $next
*
* @return Response|null
*/
protected function unverifiedAccountRedirect(Request $request, Closure $next): ?Response
{
// Your custom functionality here
}
}