-1

I have created this app with backpack for laravel where the table created by using backpack:build I need to replace the word actions with an icon from line-awesome for example toolbox

<i class="las la-toolbox"></i>

I tried to add the HTML on the language file resources/lang/vendor/backpack/en/crud.php but it's not working

enter image description here

Mansour Alnasser
  • 4,446
  • 5
  • 40
  • 51

1 Answers1

0

In Backpack 4.0 or 4.1, you can change the default buttons any way you see fit by publishing the view file, and making changes to the published file. If Backpack sees a file with the same name & path inside your project, it'll use that one instead of the one in the package.

For example:

  • if this file exists: resources/views/vendor/backpack/crud/buttons/delete.blade.php
  • then Backpack will load that one, instead of the normal vendor/backpack/crud/src/resources/views/crud/buttons/delete.blade.php

For reference, you can find all default Backpack buttons here, in the Backpack/CRUD package. Overwriting one is just a matter of creating a file with the same name in the directory I mentioned above.

You can publish a blade file even easier by using this command:

php artisan backpack:publish crud/buttons/delete

Then make any changes you want to it, like removing the text to only leave the icon.


In Backpack 4.2 it is possible that an easier solution will be implemented for this particular need. See this PR for more information. Backpack 4.2 will be released in spring 2021.

tabacitu
  • 6,047
  • 1
  • 23
  • 37