z-song / laravel-admin

Build a full-featured administrative interface in ten minutes
https://laravel-admin.org
MIT License
11.15k stars 2.82k forks source link

How can i change the layout in Data form #5693

Open shadirok opened 1 year ago

shadirok commented 1 year ago

Laravel Version: 8.83 PHP Version: 8.0 Laravel-admin: 1.8.19

Description:

How can i change the layout in Data form to somthing like this https://laravel-admin.org/docs/en/data-form

`$content->row(function(Row $row) { $row->column(4, 'foo'); $row->column(8, 'bar'); });

foo bar

----------------------------------`

My code :

`class AppointmentCapacitySearch extends Form { public $title = "title";

public function handle(Request $request)
{
    // todo : handle
}

public function form()
{
    $content = new Content();
    $content->row(function (Row $row) {
        $row->column(6, function (Column $column) {
            $this->multipleSelect('buLiNummer', 'Zielflughafen:');
            $this->select('rechnungsNummer', 'Zielgebiet:');
            $this->select('buLiNummer', 'Airline:');
            $this->select('rechnungsNummer', 'ab:');
            $this->checkbox('buLiNummer', ' inkl. stornierter Termine:');
            $this->html('</div>');
            $column->append($this);

        });
        $row->column(6, function (Column $column) {
            $column->append("sddfsdfdfdf");
        });
    });

    return $this;
}`
alexoleynik0 commented 1 year ago

Check the edit method of AdminController you're extending now, it will make sense.