PHP code example of gponster / laravel-auth-file

1. Go to this page and download the library: Download gponster/laravel-auth-file 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/ */

    

gponster / laravel-auth-file example snippets


use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableInterface;
use Illuminate\Auth\GenericUser;

class AuthUser extends GenericUser implements UserInterface, RemindableInterface {

	public static $rules = array(
	   'email'=>'
	 * Get the unique identifier for the user.
	 *
	 * @return mixed
	 */
	public function getAuthIdentifier()
	{
		return $this->attributes['email'];
	}

	/**
	 * Get the password for the user, needs to return the hashed password
	 *
	 * @return string
	 */
	public function getAuthPassword()
	{
		return $this->attributes['password'];
	}

	/**
	 * Get the e-mail address where password reminders are sent.
	 *
	 * @return string
	 */
	public function getReminderEmail()
	{
		return $this->attributes['email'];
	}
}