Cards

Card

  1. <?php
  2. use Dcat\Admin\Widgets\Card;
  3. // Fill only the content, no TITLE
  4. $card = Card::make(view('...'));
  5. // TITLE and CONTENT
  6. $card = Card::make('TITLE', 'content');
  7. // Set the spacing
  8. $card->padding('0 15px 0 12px');
  9. // Set tool buttons
  10. $card->tool('<button class="btn btn-sm btn-light shadow-none">button text</button>');
  11. // Set footer content
  12. $card->footer(view('...'));

Box

  1. <?php
  2. use Dcat\Admin\Widgets\Box;
  3. // TITLE and CONTENT
  4. $box = Box::make('TITLE', 'content');
  5. // Set the spacing
  6. $box->padding('0 15px 0 12px');
  7. // Set tool buttons
  8. $box->tool('<button class="btn btn-sm btn-light shadow-none">button text</button>');
  9. // Setting the shrink button
  10. $box->collapsable();
  11. // Set the remove button
  12. $box->removable();