PHP code example of delboy1978uk / bone-user

1. Go to this page and download the library: Download delboy1978uk/bone-user 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/ */

    

delboy1978uk / bone-user example snippets




// use statements here
use Bone\BoneDoctrine\BoneDoctrinePackage;
use Bone\Mail\MailPackage;
use Bone\Paseto\PasetoPackage;
use Bone\User\BoneUserPackage;
use Del\Person\PersonPackage;
use Del\UserPackage;

return [
    'packages' => [
        // packages here (order is important)...,
        MailPackage::class,
        BoneDoctrinePackage::class,
        PasetoPackage::class,
        PersonPackage::class,
        UserPackage::class,
        BoneUserPackage::class,
    ],
    // ...
];

export PATH=$PATH:bin:vendor/bin

$sessionAuth = $c->get(SessionAuth::class); // of course there's a use statement above, right? With the full name?
$router->map('GET', '/my/route', [MyController::class, 'whateverAction'])->middleware($sessionAuth);

$user = $request->getAttribute('user');

    /** @var UserService $userService */
    $userService = $c->get(UserService::class);
   
    /** @var PersonService $personService */
    $personService = $c->get(PersonService::class);



/*
 *  You can override views from vendor packages
 *  You should copy the vendor view folder into your src and tweak from there
 */
return [
    'views' => [
        'boneuser' => 'src/App/View/bone-user',
    ],
];

 /* config/bone-user.php */

return [
    'bone-user' => [
        'loginRedirectRoute' => '/admin',
        'enableRegistration' => true,
        '