Open that0n3guy opened 10 years ago
Something like this?
$mapper->button('http://google.com')->label('To Google');
$mapper->link('http://google.com')->label('To Google');
That works, but how do you put an edit & view button in the same collumn. Or how do I put a list of data in the column. I'm currently doing it like:
// in configureList
$mapper->string('create_comparison')->label('DIQC');
// and I have this in my model:
public function getCreateComparisonAttribute()
{
$diqr = $this;
$view = View::make('partials.comparisonlist', compact('diqr'));
return $view->render();
}
This works perfectly as it allows me to use a view and pass variables to the view, but this doesn't belong in my model.
Something like this would be very flexible:
$mapper->view('partials.comparisonlist', compact('diqr'))->label('To Google');
I didn't see a way to easily add a button/link to a list. I know I could do this with an model accessor, but is that the best way to do this?