Publish command, row_number column, makeFirstColumn(), removeAllFields(), disableResponsiveTable(), asterisk for required fields, actions, column priority, modifyField(), modifyColumn(), modifyFilter(), modifyButton(), giveaway results, satisfaction survey results
alt_text
 

Hi guys,

 

It’s been a very productive month here at Backpack, I have a lot to show you.

 

CRUD

Most interesting changes from CRUD 3.4.13 to 3.4.22:

  • new command: php artisan backpack:crud:publish fields/select2 (easily publish a field/column/filter/button view so you can overwrite it in your project);
  • new column type: row_number (if you need an index column);
  • new method for columns: $this->crud->addColumn()->makeFirstColumn();
  • new method for fields: $this->crud->removeAllFields();
  • columns' searchLogic attribute can now be a string; if you pass ‘text’ to it, for example, it will search like it were that column type; should help you make your custom columns searchable, faster;
  • new method: $this->crud->disableResponsiveTable();  - you can now enable/disable the responsive table; when disabled, it’ll show a horizontal scrollbar for the table (old school); we also have a new config option (responsive_table), to change the default for all CRUDs;
  • you can now automatically add “required" asterisks to your create/edit forms; Backpack will look inside the FormRequest, determine which are required and use that information in the forms; newly generated CRUDs will use this by default, but for your old CrudControllers you need this bit of code in your setup() method: 

          $this->crud->setRequiredFields(StoreRequest::class, 'create’); 
          $this->crud->setRequiredFields(UpdateRequest::class, 'edit'); 

  • you can now determine which controller method is currently being run, in your custom views; Larvel calls them Actions, so we call them the same;
    • $this->crud->getActionMethod(); // returns ‘create’, ‘index’, etc
    • $this->crud->actionIs('create’); // returns true/false
  • in the list view, the buttons column will try harder to stay visible; if only 2 columns fit on the screen, those two columns will be the first column and the last (buttons column); this will reduce the time needed to do stuff by 2 clicks for the user;
  • new attribute for columns - priority; now developers can decide in which order the columns are hidden by the datatables-responsive plugin; just specify the priority on each column, and datatables will hide starting with the biggest number (that means priority 1 is the most important and will be hidden last, starting from right to left);
  • you can now modify columns/fields/filters after you add them; use:
    • $this->crud->modifyColumn($name, $modifs_array);
    • $this->crud->modifyFilter($name, $modifs_array);
    • $this->crud->modifyField($name, $modifs_array, ‘create/update/both');

 

Told you it’s been a productive month :-)

For all those and more, run a composer update.

 

Satisfaction Survey

I want to thank everybody who filled in the 2018 Satisfaction Survey, about 2 months ago. It’s really helped us understand what you want, and what we should focus on. We’ve tallied the results and here are the top requested improvements. That’s what you want - so that’s what we’ll be working on. Thank you for the feedback!

  • better documentation / more examples

  • ability to use some other HTML theme (not AdminLTE)

  • switch from jQuery to Angular.JS / Vue.JS

  • better generators

  • create related items in a pop-up

  • bulk actions (at least delete)

 

Giveaway Results

Sorry to say, you haven’t won the Laracon US 2018 ticket we gave away. But Daniel Craig Jallits did :-) Good for him - I'm so glad the ticket can be put to good use. Big big thanks to everyone who forfeited their prize because they couldn’t go - they were so nice to do so. If you're going to Laracon US too, please tell people about Backpack :-)

 

Thanks for being part of Backpack. I love doing this for you guys.

Cheers!

Tabacitu

Want to help out? Thank you so much! You can star BackpackCRUD on Github so that it gets more views, add a StackOverflow filter to receive questions tagged backpack-for-laravel, purchase a commercial license, write an article, make a video or create a new package.

Made with ❤ in the E.U. Polished all around the world.

View as a Web Page | Unsubscribe