Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Base Admin Laravel Package

edezacas/base-admin

View on GitHub
Deep Wiki
Context7

EDC Base Admin

Getting Started

This bundle use Bootstrap 5.1.3 and jQuery 3.6.

This bundle includes 2 views with a set of css and js assets:

  • login.html.twig: Simple page layout with a great style.
  • base.html.twig: Minimal Admin layout.

How to use

  1. Enable this bundle at AppKernel o bundles.php:
return [
    Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
    ...
    EDC\BaseAdminBundle\EDCBaseAdminBundle::class => ['all' => true],
];
  1. Add configuration file:
edc_base_admin:
    site_name: 'Site Title'
    login_check: _route_name_or_url_to_login_check
    logout: _route_name_or_url_to_logout
    admin_home: _route_name_or_url_to_admin_homepage

  1. To show login page simply create your own login.html.twig and add:
{% include ('@EDCBaseAdmin/login.html.twig') %}
  1. For admin layout, create a template called for example layout.html.twig and add:
{% extends '@EDCBaseAdmin/base.html.twig' %}

{% block title %} _YOUR_CUSTOM_HTML_TITLE_ {% endblock %}

{% block sidebar %}
    _YOUR_CUSTOM_SIDEBAR_MENU_
{% endblock %}

{% block dropdown %}
    _YOUR_CUSTOM_DROPDOWN_MENU_BELOW_USERNAME_
{% endblock %}

{% block footer %}
   _YOUR_CUSTOM_FOOTER_BELOW_USERNAME_
{% endblock %}

  1. And at last, for each page inside admin control panel, you only need to extends from your layout.html.twig. For example, for dashboard.html.twig:
{% extends 'admin/layout.html.twig' %}

{% block content %}
    _YOUR_DASHBOARD_CONTENT_PAGE_
{% endblock %}

Bonus

Form Themes

By default we add the Bootstrap 5 Form Themes, also we have improved:

  • VichImageWidget: Added class "img-thumbnail" from Bootstrap 5 to image preview.

  • FilepondType: An usefull Form AbstractType that help us to upload multiple (or single) files/images. A compounded type with 2 childs:

    • Childs:
      • uploader: FileType field to handle file uploads.
      • files: HiddenType field to handle list of files uploaded.
    • Options:
      • 'multiple' => Allow upload multiple files (Bool)
      • 'uploadUri' => Path to request for upload files (String)
      • 'removeUri' => Path to request for remove files (String)
      • 'files' => A simple array containing paths to show images,
      • 'acceptedFileTypes' => List (coma separated) of allowed Mime Types (String)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware