orchidsoftware / crud

Simplify the process of building CRUD (Create, Read, Update, Delete) functionality in Laravel using the features of Orchid.
https://orchid.software
MIT License
138 stars 34 forks source link

Any method add commandBar custom button #3

Closed jouniikaheimo closed 3 years ago

jouniikaheimo commented 3 years ago

Hi i try to find in Orchid\Crud\Resource.php how i can add custom button in commandBar?

mucan54 commented 3 years ago

You can check this (https://github.com/orchidsoftware/crud/blob/efe8f93a3422d46614d650a1617b75b2dd95fb5f/src/Screens/CreateScreen.php#L34) you can add any button in commandbar method.

jouniikaheimo commented 3 years ago

@mucan54 Yes i know i can add any button in screen... but how i can add custom button in crud resource file... i test if i add commandBar() function in created resource file that not working...

tabuna commented 3 years ago

Hey @jouniikaheimo, this is not yet available for CRUD. I am working on it

jouniikaheimo commented 3 years ago

Hey @tabuna i don't know if this is a good idea, but would it be how hard to do an override the same way a model is set example:

public static $editScreen = EditScreen::class;
public static $listScreen = listScreen::class;
public static $createScreen = createScreen::class;

if not set use automatic default screen this make lot off new feature what can use in screen but fast make crud ??

tabuna commented 3 years ago

This is available through actions: https://github.com/orchidsoftware/crud#actions