</td> <td><?php echo $row->created_at; ?> </td> <td><?php echo $row->updated_at; ?> </td> <td> <?php echo Asset::anchor('product/show/' . $row->id, 'View', ['class' => 'btn btn btn-info btn-xs']); echo Asset::anchor('product/edit/' . $row->id, 'Edit', ['class' => 'btn btn-default btn-xs']); echo Asset::anchor('product/delete/' . $row->id, 'Delete', ['class' => 'btn btn-danger btn-xs']); ?> </td> </tr> <?php $i++; } } ?> </tbody> </table> <nav > <?php //echo $links;
public function testStaticCallToAnchorTag() { $this->setUpAssetConfig(); $anchor = Asset::anchor('user/add', 'Add User'); $this->assertEquals('<a href="http://localhost/cygnite/user/add" type="static">Add User</a>', $anchor); }
/** * @return $this */ private function setLink() { // We will set default function to twig engine $this->functions[] = $this->getTwigSimpleFunctionInstance('link', function ($link, $name = null, $attributes = []) { return Asset::anchor(str_replace('.', '/', $link), $name, $attributes); }); return $this; }
<?php use Cygnite\AssetManager\Asset; ?> <div class="pull-right"> <?php echo Asset::anchor('product', 'Back', ['class' => 'btn btn-default btn-small btn-inverse']); ?> </div> <div class="error"> <?php if (!empty($validation_errors)) { /* | Display all validation error messages here */ foreach ($validation_errors as $key => $message) { ?> <p style="color:#FF0000;"> <?php echo $message; ?> </p> <?php } } ?> </div> <div >