Fix user login
This commit is contained in:
parent
680a0841b8
commit
3b0c9ff4ca
@ -7,10 +7,12 @@ framework:
|
||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
||||
# Remove or comment this section to explicitly disable session support.
|
||||
session:
|
||||
handler_id: null
|
||||
cookie_secure: auto
|
||||
cookie_samesite: lax
|
||||
storage_factory_id: session.storage.factory.native
|
||||
handler_id: session.handler.native_file
|
||||
save_path: '%kernel.project_dir%/var/sessions'
|
||||
# handler_id: null
|
||||
# cookie_secure: auto
|
||||
# cookie_samesite: lax
|
||||
# storage_factory_id: session.storage.factory.native
|
||||
|
||||
#esi: true
|
||||
#fragments: true
|
||||
|
@ -31,7 +31,7 @@ class DashboardController extends AbstractDashboardController
|
||||
|
||||
public function configureMenuItems(): iterable
|
||||
{
|
||||
// yield MenuItem::linktoRoute('Back to home', 'fas fa-home', 'home');
|
||||
yield MenuItem::linktoRoute('Back to home', 'fas fa-home', 'home');
|
||||
|
||||
yield MenuItem::section('Products', 'fas fa-folder-open');
|
||||
yield MenuItem::linkToDashboard('Dashboard', 'fa fa-home');
|
||||
|
@ -3,7 +3,13 @@
|
||||
namespace App\Controller\Admin;
|
||||
|
||||
use App\Entity\User;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Field\ArrayField;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Field\BooleanField;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Field\IdField;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextEditorField;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
|
||||
|
||||
class UserCrudController extends AbstractCrudController
|
||||
{
|
||||
@ -12,14 +18,20 @@ class UserCrudController extends AbstractCrudController
|
||||
return User::class;
|
||||
}
|
||||
|
||||
/*
|
||||
public function configureFields(string $pageName): iterable
|
||||
{
|
||||
return [
|
||||
IdField::new('id'),
|
||||
TextField::new('title'),
|
||||
TextEditorField::new('description'),
|
||||
];
|
||||
$fields = [];
|
||||
|
||||
switch ($pageName) {
|
||||
case Crud::PAGE_INDEX:
|
||||
case Crud::PAGE_DETAIL:
|
||||
$fields[] = IdField::new('id');
|
||||
}
|
||||
*/
|
||||
|
||||
$fields[] = TextField::new('username');
|
||||
$fields[] = ArrayField::new('roles');
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ class TestController extends AbstractController
|
||||
return $this->render('base/base.html.twig');
|
||||
}
|
||||
|
||||
#[Route('/')]
|
||||
#[Route('/', name: 'home')]
|
||||
public function home()
|
||||
{
|
||||
return $this->render('base/base.html.twig');
|
||||
|
Loading…
Reference in New Issue
Block a user