2017 © Pedro Peláez
 

laravel-package laravel-wp-password

Laravel package that checks and creates WordPress password hashes

image

mikemclin/laravel-wp-password

Laravel package that checks and creates WordPress password hashes

  • Thursday, January 11, 2018
  • by mikemclin
  • Repository
  • 4 Watchers
  • 29 Stars
  • 268,857 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 4 Versions
  • 9 % Grown

The README.md

Laravel WP Password

Build Status Coverage Status, (*1)

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

Installation

Step 1: Composer

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

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

Next, update Composer from the Terminal:, (*4)

composer update

Step 2: Register Laravel Service Provider

Once this operation completes, the final step is to add the service provider., (*5)

  • 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, (*6)

use MikeMcLin\WpPassword\Facades\WpPassword;

make() - Create Password Hash

Similar to the WordPress wp_hash_password() function, (*7)

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

check() - Check Password Hash

Similar to the WordPress wp_check_password() function, (*8)

$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., (*9)

The Versions

11/01 2018

dev-master

9999999-dev https://github.com/mikemclin/laravel-wp-password

Laravel package that checks and creates WordPress password hashes

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress laravel password hashing

11/01 2018

2.0.1

2.0.1.0 https://github.com/mikemclin/laravel-wp-password

Laravel package that checks and creates WordPress password hashes

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress laravel password hashing

12/02 2015

2.0.0

2.0.0.0 https://github.com/mikemclin/laravel-wp-password

Laravel package that checks and creates WordPress password hashes

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress laravel password hashing

15/08 2014

1.0.0

1.0.0.0 https://github.com/mikemclin/laravel-wp-password

Laravel package that checks and creates WordPress password hashes

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress laravel password hashing