Replies: 2 comments
-
Hello @rezahmady What field are you trying to use? How your custom operation works? Cheers. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the late reply @rezahmady . We don't have a guide on how to use uploaders in custom operations - but if more people ask for it, we could create one. Right now the only way to do that is to look at the code of the Create & Update operations and do the same thing. If you take a look at the Create operation for example, you can see we're calling methods on the CrudPanel object: public function store()
{
$this->crud->hasAccessOrFail('create');
// execute the FormRequest authorization and validation, if one is required
$request = $this->crud->validateRequest();
// register any Model Events defined on fields
$this->crud->registerFieldEvents();
// insert item in the db
$item = $this->crud->create($this->crud->getStrippedSaveRequest($request));
$this->data['entry'] = $this->crud->entry = $item;
// show a success message
\Alert::success(trans('backpack::crud.insert_success'))->flash();
// save the redirect choice for next time
$this->crud->setSaveAction();
return $this->crud->performSaveAction($item->getKey());
} Go deeper into the CrudPanel Hope it helps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When creating a New Operation with a Form how to uploads files?
Beta Was this translation helpful? Give feedback.
All reactions