public function table($workRequest)
    {
        return $this->table->of('work-requests', function (TableGrid $table) use ($workRequest) {
            $table->with($workRequest)->paginate($this->perPage);

            $table->attributes([
                'class' => 'table table-hover table-striped',
            ]);

            $table->column('ID', 'id');

            $table->column('subject', function (Column $column) {
                $column->value = function (WorkRequest $workRequest) {
                    return link_to_route('maintenance.work-requests.show', $workRequest->subject, [$workRequest->getKey()]);
                };
            });

            $table->column('best_time');

            $table->column('created_at');
        });
    }
public function table($workRequest)
    {
        return $this->table->of('work-requests', function (TableGrid $table) use ($workRequest) {
            $table->with($workRequest)->paginate($this->perPage);

            $table->attributes([
                'class' => 'table table-hover table-striped',
            ]);

            $table->column('ID', 'id');

            $table->column('subject', function (Column $column) {
                $column->value = function (WorkRequest $workRequest) {
                    return link_to_route('maintenance.work-requests.show', $workRequest->subject, [$workRequest->getKey()]);
                };
            });

            $table->column('best_time');

            $table->column('created_at');
        });
    }
public function table ( $ workRequest ) { return $ this -> table -> of ( 'work-requests' , function ( TableGrid $ table ) use ( $ workRequest ) { $ table -> with ( $ workRequest ) -> paginate ( $ this -> perPage ) ; $ table -> attributes ( [ 'class' => 'table table-hover table-striped' , ] ) ; $ table -> column ( 'ID' , 'id' ) ; $ table -> column ( 'subject' , function ( Column $ column ) { $ column -> value = function ( WorkRequest $ workRequest ) { return link_to_route ( 'maintenance.work-requests.show' , $ workRequest -> subject , [ $ workRequest -> getKey ( ) ] ) ; } ; } ) ; $ table -> column ( 'best_time' ) ; $ table -> column ( 'created_at' ) ; } ) ; }
Returns a new table of all work requests.

@param WorkRequest $workRequest

@return \Orchestra\Contracts\Html\Builder
Returns a new table of all work requests .