Folder Structure

Vuexy also provide HTML laravel version. In this page, we have provided installation and usage information.

Once you download the template from ThemeForest, unzip the package and you will find the below folder structure in vuexy-bootstrap-laravel-admin-template/.


                
                    vuexy-bootstrap-laravel-admin-template/
                    ├── app/
                    |   ├── Http/
                    |   |   ├── Controllers/
                    ├── bootstrap/
                    ├── config/
                    |   ├── custom.php (Template configuration file)
                    ├── database/
                    ├── public/
                    |   ├── css/
                    |   ├── data/
                    |   |   ├── locales/ (Langulage files)
                    |   |   ├── ag-grid-data.json
                    |   |   ├── laravel-search-list.json
                    |   ├── fonts/
                    |   ├── images/
                    |   ├── js/
                    |   ├── vendors/
                    |   ├── mix-manifest.json
                    ├── resources/
                    |   |   ├── images/ (Vuexy Admin images)
                    |   |   ├── js/ (Include js files)
                    |   |   ├── json/
                    |   |   |   ├── horizontalMenu.json
                    |   |   |   ├── verticalMenu.json
                    |   |   ├── lang/ (Include Languages)
                    |   |   ├── sass/ (Include scss files)
                    |   |   ├── views/ (Include blade.php files)
                    |   |   |   ├── layouts/
                    |   |   |   ├── pages/
                    |   |   |   ├── panels/
                    ├── routes/
                    ├── storage/
                    ├── tests/ (For testing)
                    ├── .editorconfig (Related with your editor)
                    ├── .env.example (Include Database credentials, it will be .env after update it.)
                    ├── artisan (Include artisans commands)
                    ├── composer.json (Dependencies used by composer)
                    ├── package.json (Dependencies used by node)
                    ├── phpunit.xml (Related With testing)
                    ├── server.php (For php's internal web server)
                    └── webpack.mix.js (Laravel's webpack file)
                
            
Following is the details for laravel folder structure.
Folder/Files Details
app/ This folder contains all the controller inside controllers folder and model files.
bootstrap/ This folder contains cache and app.php.
config/ This folder contains the config files. You can find custom.php file for template customization.
database/ This folder contains database Migrations, model factories, & seeds.
public/ This folder contains index.php ,static folder & Build of the tempalte.
public/data/laravel-search-list.json This file contains the list of search menu items.
resources/ This folder contains views, layouts, store and js, sass, json files.
routes/ It contains the web.php file where pages can be served on the browser.
storage/ This folder contains compile blade templates.
verticalMenu.json It contains the list of main-menu sidebar items of Vertical menu.
horizontalMenu.json It contains the list of main-menu items of Horizontal menu.
views/layouts It contains the all master layout files.
views/panels It contains all panel files like header / footer / sidebar / navbar etc.
views/pages It contains the content page files. To create new page refer the code.

Installation

Given below are the steps you need to follow, to install the vuexy-bootstrap-laravel-admin-template on your system:

Step 1: Open the terminal in your root directory(vuexy-bootstrap-laravel-admin-template) & to install the composer packages run the following command:

Step 2: In the root directory, you will find a file named .env.example, rename the given file name to .env and run the following command to generate the key (and you can also edit your database credentials here).

Step 3: By running the following command, you will be able to get all the dependencies in your node_modules folder:

Step 4: If you want to watch all the changes you make in the application then run the following command in the root directory.

Step 5: To run the project, you need to run following command in the project directory. It will compile the php files & all the other project files. If you are making any changes in any of the .php file then you need to run the given command again.

Step 6: If you want to run the project and make the build in the production mode then run the following command in the root directory, otherwise the project will continue to run in the development mode.

Step 7: To serve the application you need to run the following command in the project directory. (This will give you an address with port number 8000.)

Now navigate to the given address you will see your application is running.

To change the port address, run the following command:

Required Permissions

If you are facing any issues regarding the permissions, then you need to run the following command in your project directory:

Create New Page

How to add a New Page:

  • Create New View with blade.php extenstion.
  • Create Controller for different methods related to page. (Optional. You can use default controller also.)
  • Set Path in route.php file to serve the page on the browser.
  • Add page link to resources -> json -> verticalMenu.json & horizontalMenu.json files to display menu item in sidebar/menu.
  • Add page link to public -> data -> laravel-search-list.json file to display in navbar search option.
Steps to add a new page :

Step 1: Create a file with the extension .blade.php under the resources -> views -> pages directory. Let's create a testPage for an example with filename testPage.blade.php and placing the below code in that file.

                    
                        @extends('layouts/contentLayoutMaster') // choose any one option {contentLayoutMaster/fullLayoutMaster}

                        @section('title', 'Content Layout')  // change title accrodingly

                        @section('content')
                            <div>
                                .....
                            </div>
                        @endsection
                    
                

Step 2: To add new controller, use below command :

Add Configuration in controller as described here.

To add breadcrumbs :

                    
                    $breadcrumbs = [
                        ['link'=>"/",'name'=>"Home"],['link'=>"/",'name'=>"Page"], ['name'=>"Content Layout"]
                    ];

                    return view('/pages/content-layout', [
                        'breadcrumbs' => $breadcrumbs
                    ]);
                    
                

Step 3: After creating file and controller you need to declare its route where it can be served on the browser, suppose you want created page to be serve on the route http://localhost:8080/testPage . To access this page define its routes in the resources -> web.php file.

                    
                    Route::get('/testPage', function () {
                        return view('pages/testPage');
                    });
                    
                

Step 4: After defining the route, add page link to sidebar at resources -> json -> verticalMenu.json / horizontalMenu.json file.

Option 1: To add item in menu.

                    
                    {"url":"/testPage", "name":"Test Page", "i18n":"Test Page", "icon":"feather icon-file-text"},
                    
                

Option 2: To add item as a sub menu item.

                    
                    {"url":"#", "name":"Main menu", "i18n":"Main Menu", "icon":"feather icon-file-text",
                        "submenu": [
                            {"url":"submenu1", "name":"Submenu 1", "i18n":"Submenu1", "icon":"feather icon-circle"},
                            {"url":"submenu2", "name":"Submenu 2", "i18n":"Submenu2", "icon":"feather icon-circle"}
                        ]
                    },
                    
                

Step 5: For page searching options in navbar search box, add page link in public -> data -> laravel-search-list.json file.

                    
                    {"name":"Test Page", "url":"/testPage","icon":"feather icon-file-text"},
                    
                

After completing these above steps you need to run the command npm run dev or npm run watch command in the project directory. After running this process you need to run the command php artisan serve . It will serve your app on the localhost.

Configuration

To configuration Options in details:

Key Possible Options Details
theme light (default) / dark / semi dark This variable provides the options for theme layouts.
sidebarCollapsed true / false (default) This variable provides the collapsible sidebar.
navbarColor bg-{primary/info/success/danger/warning} This variable provides the navbar color options.
menuType fixed (default), static This variable provides the menu layout options.
navbarType floating (default), static, sticky, hidden This variable provides the navbar layout options.
footerType static (default), sticky, hidden This variable provides the footer layout options.
bodyClass Using this variable, you can add your own custom class to include in <body> tag.
pageHeader true(default), false This option is used to show breadcrumb.
contentLayout ""(default), content-left-sidebar, content-right-sidebar, content-detached-left-sidebar, content-detached-right-sidebar Leave this option blank for default layout with sidebar.
blankPage true, false(default) Pages that don't require to show header, footer, sidebar will be done by "blankPage" valur to "true". For example: Login, register, etc pages need this option value to be true on page level.
mainLayoutType vertical(default), horizontal To switch vertical/horizontal layout. By defaul this will work with vertical layout.
direction env('MIX_CONTENT_DIRECTION', 'ltr')(default), env('MIX_CONTENT_DIRECTION', 'rtl') To switch ltr/rtl direction of the layout. By defaul this will work with LTR layout.

Change for Page Level Configuration :
If you want to add Page level configuration for layout, you need to to set array for page configuration in app -> Http -> Controller -> {Controller file} and send it to your view.

                    
                    public function {functionName}(){
                        $pageConfigs = [
                            'theme' => 'dark',
                            'navbarColor' => 'bg-primary',
                            'navbarType' => 'static',
                            'footerType' => 'sticky',
                            'bodyClass' => 'testClass'
                        ];

                        return view('/pages/testPage', [
                            'pageConfigs' => $pageConfigs
                        ]);
                    }
                    
                

RTL

To create RTL layout, Follow below steps then build the template.

Step 1

Change MIX_CONTENT_DIRECTION variable value from ltr to rtl in .env file

Step 2

Change configuration option from config -> custom.php file.

Update direction value from env('MIX_CONTENT_DIRECTION', 'ltr') to env('MIX_CONTENT_DIRECTION', 'rtl')