PHP code example of westacks / laravel-auth

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

    

westacks / laravel-auth example snippets


'providers' => [
    /*
     * Package Service Providers...
     */
    WeStacks\Laravel\Auth\Providers\AuthServiceProvider::class,
],

# routes/web.php



use Illuminate\Support\Facades\Route;

Route::auth();

# routes/web.php



use Illuminate\Support\Facades\Route;

Route::auth([
    'views' => false
]);

# routes/web.php



use Illuminate\Support\Facades\Route;

Route::auth([
    'login_view'            => 'auth::login',
    'register_view'         => 'auth::register',
    'reset_password_view'   => 'auth::password.reset',
    'forgot_password_view'  => 'auth::password.forgot',
    'confirm_password_view' => 'auth::password.confirm',
    'verify_view'           => 'auth::verify',
]);

# routes/web.php



use Illuminate\Support\Facades\Route;

Route::auth([
    'login'    => true,
    'logout'   => true,
    'register' => true,
    'reset'    => true,
    'confirm'  => false,
    'verify'   => false,
]);

# routes/web.php



use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AuthController;

Route::auth([
    'controller' => AuthController::class,
    'middleware' => 'auth' // if you using custom guards for authenticated routes, put them here
]);

# app/Http/Controllers/AuthController.php



namespace App\Http\Controllers;

use WeStacks\Laravel\Auth\Controllers\AuthController as Controller;

class AuthController extends Controller
{
    // Your customs here
}

bash
php artisan vendor:publish --provider="WeStacks\Laravel\Auth\Providers\AuthServiceProvider"
bash
php artisan make:controller AuthController