logo The World’s #1 Bootstrap 4 HTML, Angular 10, React, VueJS & Laravel
Admin Dashboard Theme

Laravel: File Structure


Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects.

We, at KeenThemes, have implemented our multipurpose dashboard application theme Metronic with this amazing PHP framework for Laravel developers can concentrate on application and not caring much about theme-to-framework integration.

Currently we provide only demo1 version of theme with comprehensive layout configuration and set of views.

Laravel with Metronic Demo Pages

The application source is located in [metronic]/theme/html_laravel/

Path Description
themeThe Metronic theme pacakge.
html_laravelLaravel application demo
demo1demo1 base folder for Laravel application
skeletonLaravel application with sample pages.

Application Directory Structure

Application specific files and folders for Metronic+Laravel integration on top of standart Laravel directory structure. We will not list all standart files/directories if they are not related to this application. Refer to Laravel directory structure documentation for framework defaults.
Path Description
appThe App Directory. Controllers and other running classes are placed here.
ClassesCustom classes directory.
ThemeMetronic PHP Classes folder. None of the Classes inside need to be edited for application to run.
Init.phpInitialises layouts and components.
Menu.phpRenders vertical (aside) and horizontal (header) menus.
Metronic.phpThe heart of theme functionality. Helps rendering SVG icons, loads CSS and JS components, classes and functions.
HttpRequests, Controllers etc.
ControllersApplication Controllers live here.
Controller.phpMain application abstract Controller. Usually extends other Controllers.
PagesController.phpDemo pages controller for this application. Containes few methods to load demo pages. Can be edited or removed at courtesy of developers.
configConfiguration files are located here. Here we also placed configurational files that are required for layouts and menus.
layout.phpMain layout configuration. Edit values to adjust theme layouts the way you like. Please refer to layout builder to see layout configuration examples.
menu_aside.phpAside menu configuration.
menu_header.phpHeader menu configuration.
publicHere will be placed publicly accessible assets and files.
resourcesApplication resources and view files are located here. From it's subfolders and files npm will build public assets, app will renders views and layouts.
jsJavaScript configuration loaders for compiler (laravel-mix and webpack).
langDefault Laravel translation fileset.
metronicTheme specific global assets and plugins source.
pluginsCustom plugins and modules source.
sassSCSS configuration loaders are located here.
viewsApplication view files live here. Laravel is set to renders views from this folder by default.
layoutTheme layout files and partials for application.
baseBase layout template components.
_aside.blade.phpSide menu partial.
_content.blade.phpContent section template.
_footer.blade.phpFooter pertial.
_header-mobile.blade.phpMobile header toggle partial.
_header.blade.phpHeader template.
_layout.blade.phpMain layout template.
patialsPartials for layouts and pages. Mostly configured from config/layout.php
extrasDropdowns, Offcanvas panels and other includable page elements.
subheaderPage subheader variaiton partials.
pagesDemo pages. All loaded from App\Controllers\PagesController.php for which routes are defined in routes/web.php
widgetsDemo widgets for dashboard page.
dashboard.blade.phpDashboard page view file. Route: /
datatables.blade.phpDatatables example page view. Route: /datatables
ktdatatables.blade.phpMetronic Custom Datatables page view. Route: /ktdatatables
select2.blade.phpSelect2 plugin example page view. Route: /select2
package.jsonThis file contains meta data about app or module. Most importantly, it includes the list of dependencies to install from npm when running npm install.
package-lock.jsonpackage-lock.json is automatically generated for any operations where npm modifies either the node_modules tree, or package.json
webpack.mix.jsWebpack confiand Laravel Mix configuration - defines how are assets are compiled. Handle with care!