Skip to content

Instantly share code, notes, and snippets.

@bvipul
Created January 26, 2018 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bvipul/ddf6e3b2c82968143834586567795b9d to your computer and use it in GitHub Desktop.
Save bvipul/ddf6e3b2c82968143834586567795b9d to your computer and use it in GitHub Desktop.
New Blog Attribute
<?php
namespace App\Models\Blogs\Traits\Attribute;
/**
* Class BlogAttribute.
*/
trait BlogAttribute
{
/**
* @return string
*/
public function getActionButtonsAttribute()
{
return '<div class="btn-group action-btn">'.
$this->getEditButtonAttribute('edit-blog', 'admin.blogs.edit').
$this->getDeleteButtonAttribute('delete-blog', 'admin.blogs.destroy').
'</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment