$id = request()->input('id', '');
$this->crud->addClause('where', 'flight_id', '=', $id);
0
I need help. I am currently working with Laravel backpack and I have the following problem: I have a field called Media, that field has two behaviors, one to upload images and the other to write a URL, the problem is that it only lets me create the one time the field. Is there a way in laravel backpack to create 2 different fields with the same name?
I want to achieve something more or less like this:
CRUD::addField([ 'name' => 'data', 'label' => 'url_media', 'type' => 'upload', ]);
CRUD::addField([ 'name' => 'data', 'label' => 'url_media', 'type' => 'url', ]);
Hello ,
Using repeatable field , I have select2 fields as subfields in that repeatable field. Everything works ok until reordering. After re-ordering the rows , the elements are not clickable anymore . Tried select instead of select2 and it seems (in the repeatable view) as it clones the elements it does not clone the selected value. As for select2 the same happens as well plus it seems i have to destroy select2 and re-init it after clone.
Tried this for one element , if I have more selects in the repeatable row it becomes a mess.
Any ideas? Am I missing something ? Is there a patch or a tip about it?
Thanks
I am trying to figure out the best way to clone an item that has unique constraints.
I can exclude/modify the attributes I want prior to the $clonedEntry->push() action, but what I really want to do is pass all the attributes I have (minus the ones that are unique) to the Create view and have it populated with the values from the replicate method.
Can this be done easily, I'm not sure if there might be a different way. Basically, I want users to be able to edit/update the replicated attributes pror to saving the record.
MultipleListsOperation
, basically a clone of the list one but with the changes you need. publish the list views and modify them for your custom operation, like list.blade.php
call it multiple_list.blade.php
etc and show whatever you need in your new operation. That way you can still use the Backpack ListOperation when needed in your other cruds
CloneAndCreateOperation
, write your magic, it should be pretty straigthfoward and easy to do.
My code ;
CRUD::addField([
'type' => "relationship",
'name' => 'superSector', // the method on your model that defines the relationship
'ajax' => true,
'inline_create' => true, // assumes the URL will be "/admin/category/inline/create"
]);
Hello, I am working with a load type field, when saving it does it successfully, the problem is when editing something like: image is required, but I do not understand why that error appears if in the type field uploads is the image path
$this->crud->addField([
'name' => 'imagen',
'label' => 'Image',
'type' => 'upload',
'upload' => true
]);
Hello,
we have the product of a DB select, which we want to show with the backpack CRUD, is there any way to do it , https://stackoverflow.com/questions/72024697/use-product-of-select-bbdd-with-the-crud-of-backpack
{"en":"content en","cy":"content cy"}
if I go back and edit this again, only the en
data is populated, regardless of the language selected. Has anyone else had this problem and fixed it?
Hello,
By searching github and stackoverflow , I haven't yet understand if it is possible to have "Upload" field as subfield in Repeatable ?
Using "browse" so far , but browse is a little bit problematic for me because I don't want other users to see whats inside the storage folder...I want to control what a user can see and with Elfinder I think it starts to be more complicated.
Best regards