Open lizhufei opened 5 years ago
把 vendor/pigzzz123/adminlte3/views/grid/table.blade.php
内容全部替换成
<div class="card">
@if(isset($title))
<div class="card-header">
<h3 class="card-title"> {{ $title }}</h3>
</div>
@endif
@if ( $grid->showTools() || $grid->showExportBtn() || $grid->showCreateBtn() )
<div class="card-header">
<div class="float-right" style="margin-right: -10px;">
<!-- {!! $grid->renderColumnSelector() !!} -->
{!! $grid->renderExportButton() !!}
{!! $grid->renderCreateButton() !!}
</div>
@if ( $grid->showTools() )
<span>
{!! $grid->renderHeaderTools() !!}
</span>
@endif
</div>
@endif
{!! $grid->renderFilter() !!}
<div class="card-body table-responsive no-padding">
<table class="table table-hover">
<thead>
<tr>
@foreach($grid->columns() as $column)
<th>{{$column->getLabel()}}{!! $column->sorter() !!}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach($grid->rows() as $row)
<tr {!! $row->getRowAttributes() !!}>
@foreach($grid->columnNames as $name)
<td {!! $row->getColumnAttributes($name) !!}>
{!! $row->column($name) !!}
</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
</div>
{!! $grid->renderFooter() !!}
<div class="card-footer clearfix">
{!! $grid->paginator() !!}
</div>
</div>
就可以正常使用了
把 vendor/pigzzz123/adminlte3/views/grid/table.blade.php
内容全部替换成
<div class="card"> @if(isset($title)) <div class="card-header"> <h3 class="card-title"> {{ $title }}</h3> </div> @endif @if ( $grid->showTools() || $grid->showExportBtn() || $grid->showCreateBtn() ) <div class="card-header"> <div class="float-right" style="margin-right: -10px;"> <!-- {!! $grid->renderColumnSelector() !!} --> {!! $grid->renderExportButton() !!} {!! $grid->renderCreateButton() !!} </div> @if ( $grid->showTools() ) <span> {!! $grid->renderHeaderTools() !!} </span> @endif </div> @endif {!! $grid->renderFilter() !!} <div class="card-body table-responsive no-padding"> <table class="table table-hover"> <thead> <tr> @foreach($grid->columns() as $column) <th>{{$column->getLabel()}}{!! $column->sorter() !!}</th> @endforeach </tr> </thead> <tbody> @foreach($grid->rows() as $row) <tr {!! $row->getRowAttributes() !!}> @foreach($grid->columnNames as $name) <td {!! $row->getColumnAttributes($name) !!}> {!! $row->column($name) !!} </td> @endforeach </tr> @endforeach </tbody> </table> </div> {!! $grid->renderFooter() !!} <div class="card-footer clearfix"> {!! $grid->paginator() !!} </div> </div>
就可以正常使用了
替换之后报另外一个错误了,laravel-admin = 1.7.3
Object of class Encore\Admin\Grid\Column could not be converted to string (View: /vagrant/www/test/laravel-admin/vendor/pigzzz123/adminlte3/resources/views/grid/table.blade.php
把 vendor/pigzzz123/adminlte3/views/grid/table.blade.php 内容全部替换成
<div class="card"> @if(isset($title)) <div class="card-header"> <h3 class="card-title"> {{ $title }}</h3> </div> @endif @if ( $grid->showTools() || $grid->showExportBtn() || $grid->showCreateBtn() ) <div class="card-header"> <div class="float-right" style="margin-right: -10px;"> <!-- {!! $grid->renderColumnSelector() !!} --> {!! $grid->renderExportButton() !!} {!! $grid->renderCreateButton() !!} </div> @if ( $grid->showTools() ) <span> {!! $grid->renderHeaderTools() !!} </span> @endif </div> @endif {!! $grid->renderFilter() !!} <div class="card-body table-responsive no-padding"> <table class="table table-hover"> <thead> <tr> @foreach($grid->columns() as $column) <th>{{$column->getLabel()}}{!! $column->sorter() !!}</th> @endforeach </tr> </thead> <tbody> @foreach($grid->rows() as $row) <tr {!! $row->getRowAttributes() !!}> @foreach($grid->columnNames as $name) <td {!! $row->getColumnAttributes($name) !!}> {!! $row->column($name) !!} </td> @endforeach </tr> @endforeach </tbody> </table> </div> {!! $grid->renderFooter() !!} <div class="card-footer clearfix"> {!! $grid->paginator() !!} </div> </div>
就可以正常使用了
替换之后报另外一个错误了,laravel-admin = 1.7.3
Object of class Encore\Admin\Grid\Column could not be converted to string (View: /vagrant/www/test/laravel-admin/vendor/pigzzz123/adminlte3/resources/views/grid/table.blade.php
把代码换成这样: `
@endif
@if ( $grid->showTools() || $grid->showExportBtn() || $grid->showCreateBtn() )
<div class="card-header">
<div class="float-right" style="margin-right: -10px;">
<!-- {!! $grid->renderColumnSelector() !!} -->
{!! $grid->renderExportButton() !!}
{!! $grid->renderCreateButton() !!}
</div>
@if ( $grid->showTools() )
<span>
{!! $grid->renderHeaderTools() !!}
</span>
@endif
</div>
@endif
{!! $grid->renderFilter() !!}
{!! $grid->renderHeader() !!}
<div class="card-body table-responsive no-padding">
<table class="table table-hover" id="{{ $grid->tableID }}">
<thead>
<tr>
@foreach($grid->visibleColumns() as $column)
<th {!! $column->formatHtmlAttributes() !!}>{{$column->getLabel()}}{!! $column->renderHeader() !!}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach($grid->rows() as $row)
<tr {!! $row->getRowAttributes() !!}>
@foreach($grid->columnNames as $name)
<td {!! $row->getColumnAttributes($name) !!}>
{!! $row->column($name) !!}
</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
</div>
{!! $grid->renderFooter() !!}
<div class="card-footer clearfix">
{!! $grid->paginator() !!}
</div>
laravel 5.7 laravel-admin 1.6.11 之前用的好好的,不知道更新了什么就变成这样了