Layout

The layout usage of ezadev-admin can be found in the index() method of the home page's layout file HomeController.php.

The Ezadev\Admin\Layout\Content class is used to implement the layout of the content area. The Content::body ($element) method is used to add page content:

The page code for an unfilled content is as follows:

public function index()
{
    return Admin::content(function (Content $content) {

        // optional
        $content->header('page header');

        // optional
        $content->description('page description');

        $content->breadcrumb(
            ['text' => 'Dashboard', 'url' => '/admin'],
            ['text' => 'User management', 'url' => '/admin/users'],
            ['text' => 'Edit user']
        );

        // Fill the page body part, you can put any renderable objects here
        $content->body('hello world');
    });
}

Method $content->body(); can accepts any renderable objects, like string, number, class that has method __toString, or implements RenderableHtmlable interface , include Laravel View objects.

Layout

ezadev-admin use grid system of bootstrap,The length of each line is 12, the following is a few simple examples:

Add a line of content:

Add multiple columns within the line:

Column in the column:

Add rows in rows and add columns:

Add body into a page:

Create a blade view file inside /project/resources/views/admin/custom.blade.php

Last updated