Package

Mikemclin Laravel Wp Password

Laravel package that checks and creates WordPress password hashes

Package

mikemclin/laravel-wp-password

View on GitHub →

Laravel WP Password

This Laravel 4/5/6/7 package provides an easy way to create and check against WordPress password hashes. WordPress is not required.

Installation

Step 1: Composer

Begin by installing this package through Composer. Edit your project's composer.json file to require mikemclin/laravel-wp-password.

"require": {
"mikemclin/laravel-wp-password": "~2.0.1"
}

Next, update Composer from the Terminal:

composer update
Step 2: Register Laravel Service Provider

Once this operation completes, the final step is to add the service provider.

  • Laravel 5.x: Open config/app.php, and add a new item to the providers array
  • Laravel 4.x: Open app/config/app.php, and add a new item to the providers array
'MikeMcLin\WpPassword\WpPasswordProvider'

Usage

Add a use statement for the WpPassword facade

use MikeMcLin\WpPassword\Facades\WpPassword;

make() - Create Password Hash

Similar to the WordPress wp_hash_password() function

$hashed_password = WpPassword::make('plain-text-password');

check() - Check Password Hash

Similar to the WordPress wp_check_password() function

$password = 'plain-text-password';
$wp_hashed_password = '$P$B7TRc6vrwCfjgKLZLgmN.dmPo6msZR.';
 
if ( WpPassword::check($password, $wp_hashed_password) ) {
// Password success!
} else {
// Password failed :(
}

Dependency Injection

I used a facade above to simplify the documentation. If you'd prefer not to use the facade, you can inject the following interface: MikeMcLin\WpPassword\Contracts\WpPassword.

Mikemclin Laravel Wp Password Related Articles

9 Quick Tips for Auth in Laravel image

9 Quick Tips for Auth in Laravel

Read article
Generate Secure, Memorable Passphrases in PHP with PHP Passphrase image

Generate Secure, Memorable Passphrases in PHP with PHP Passphrase

Read article
Laravel Forge – Password Protect a Folder image

Laravel Forge – Password Protect a Folder

Read article
Laravel 5.6 is Live, Here’s What’s New! image

Laravel 5.6 is Live, Here’s What’s New!

Read article
Laravel 5.6 will Support the Argon2i Password Hashing Algorithm image

Laravel 5.6 will Support the Argon2i Password Hashing Algorithm

Read article
One-time Password Manager for Laravel image

One-time Password Manager for Laravel

Read article
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $9500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Pushsilver logo

Pushsilver

Pushsilver is simple invoicing for freelancers and small studios — send polished invoices, automate reminders, and get paid on time without the bloat.

Pushsilver
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum