PHP code example of ay4t / ionauth-views

1. Go to this page and download the library: Download ay4t/ionauth-views 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/ */

    

ay4t / ionauth-views example snippets


php spark migrate -n IonauthView
php spark db:seed IonauthView\Database\Seeds\IonAuthSeeder
sh
/*
 * --------------------------------------------------------------------
 * Route ay4t Auth Definitions
 * --------------------------------------------------------------------
 */
$routes->group('auth', ['namespace' => 'IonauthView\Controllers'], function ($routes) {
	$routes->get('login', 'Auth::signin');
	$routes->get('signup', 'Auth::signup');
	$routes->get('forgot_password', 'Auth::forgotPassword');
	$routes->get('reset_password/(:hash)', 'Auth::resetPassword/$1');
	$routes->get('logout', 'Auth::signout');
	
	/** ROUTES FOR APIS CALL BY AJAX FORM */
	$routes->post('login', 'AuthHandler::doSignIn');
	$routes->post('signup', 'SignupHandler::create');
	$routes->post('forgot_password', 'ForgotPassHandler::createForgotPassword');
	$routes->post('reset_password', 'ForgotPassHandler::createResetPassword');
});