Laravel Nova. Save array in custom fieldCan Anyone Explain Laravel 5.2 Multi Auth with ExampleLaravel saving dynamic input data array in to databaseadmin-panel laravel array to string conversionsWhy does Laravel array cast sort the elements, and can it be avoided?Laravel nova overriding/setting custom value for the Fields or Has Through relationshipIntegration of bigbluebutton on Laravel nova admin dashboardLaravel Nova getting the relations in the custom Text fieldLaravel Nova: Dynamically bind fields to JSON attribute on modelLaravel Nova tool is not showing anythingDate field must cast to 'date' in Eloquent model
How to compactly explain secondary and tertiary characters without resorting to stereotypes?
Can someone clarify Hamming's notion of important problems in relation to modern academia?
Why do I get negative height?
Fair gambler's ruin problem intuition
Different meanings of こわい
Unlock My Phone! February 2018
how do we prove that a sum of two periods is still a period?
OP Amp not amplifying audio signal
What is required to make GPS signals available indoors?
What do you call someone who asks many questions?
What Exploit Are These User Agents Trying to Use?
How to show a landlord what we have in savings?
Does the Idaho Potato Commission associate potato skins with healthy eating?
Do creatures with a listed speed of "0 ft., fly 30 ft. (hover)" ever touch the ground?
Is it inappropriate for a student to attend their mentor's dissertation defense?
Venezuelan girlfriend wants to travel the USA to be with me. What is the process?
What are the G forces leaving Earth orbit?
Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?
Can compressed videos be decoded back to their uncompresed original format?
Bullying boss launched a smear campaign and made me unemployable
Why were 5.25" floppy drives cheaper than 8"?
Rotate ASCII Art by 45 Degrees
How to remove border from elements in the last row?
How do I exit BASH while loop using modulus operator?
Laravel Nova. Save array in custom field
Can Anyone Explain Laravel 5.2 Multi Auth with ExampleLaravel saving dynamic input data array in to databaseadmin-panel laravel array to string conversionsWhy does Laravel array cast sort the elements, and can it be avoided?Laravel nova overriding/setting custom value for the Fields or Has Through relationshipIntegration of bigbluebutton on Laravel nova admin dashboardLaravel Nova getting the relations in the custom Text fieldLaravel Nova: Dynamically bind fields to JSON attribute on modelLaravel Nova tool is not showing anythingDate field must cast to 'date' in Eloquent model
I use nova.laravel.com. And I try create custom field for this admin panel for creation gallery, which save data as array ["image1.png","image2.png"].
If column in database as string (without $casts in model as array
) and before - create json from array - all works good.
But I want do in model cast to native type as array:
protected $casts = [
'images' => 'array'
];
How can I save data as array, if Laravel Nova on frontend give me input
, which cannot save objectarray. And save all as string.
Can I do this? Thank You.
laravel laravel-nova
add a comment |
I use nova.laravel.com. And I try create custom field for this admin panel for creation gallery, which save data as array ["image1.png","image2.png"].
If column in database as string (without $casts in model as array
) and before - create json from array - all works good.
But I want do in model cast to native type as array:
protected $casts = [
'images' => 'array'
];
How can I save data as array, if Laravel Nova on frontend give me input
, which cannot save objectarray. And save all as string.
Can I do this? Thank You.
laravel laravel-nova
1
Please try to reformulate your question. It's not clear what your problem is.
– StefanG
Mar 21 at 21:17
add a comment |
I use nova.laravel.com. And I try create custom field for this admin panel for creation gallery, which save data as array ["image1.png","image2.png"].
If column in database as string (without $casts in model as array
) and before - create json from array - all works good.
But I want do in model cast to native type as array:
protected $casts = [
'images' => 'array'
];
How can I save data as array, if Laravel Nova on frontend give me input
, which cannot save objectarray. And save all as string.
Can I do this? Thank You.
laravel laravel-nova
I use nova.laravel.com. And I try create custom field for this admin panel for creation gallery, which save data as array ["image1.png","image2.png"].
If column in database as string (without $casts in model as array
) and before - create json from array - all works good.
But I want do in model cast to native type as array:
protected $casts = [
'images' => 'array'
];
How can I save data as array, if Laravel Nova on frontend give me input
, which cannot save objectarray. And save all as string.
Can I do this? Thank You.
laravel laravel-nova
laravel laravel-nova
edited Mar 22 at 7:14
Pavel
asked Mar 21 at 20:40
PavelPavel
111
111
1
Please try to reformulate your question. It's not clear what your problem is.
– StefanG
Mar 21 at 21:17
add a comment |
1
Please try to reformulate your question. It's not clear what your problem is.
– StefanG
Mar 21 at 21:17
1
1
Please try to reformulate your question. It's not clear what your problem is.
– StefanG
Mar 21 at 21:17
Please try to reformulate your question. It's not clear what your problem is.
– StefanG
Mar 21 at 21:17
add a comment |
1 Answer
1
active
oldest
votes
Looks like there is a package already made for this.
https://novapackages.com/packages/halimtuhu/array-images
Example usage ArrayImages::make('Images', 'images')->disk('public'),
This library also use JSON.stringify(app.images) I want without JSON, save as array
– Pavel
Mar 22 at 6:38
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55288916%2flaravel-nova-save-array-in-custom-field%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Looks like there is a package already made for this.
https://novapackages.com/packages/halimtuhu/array-images
Example usage ArrayImages::make('Images', 'images')->disk('public'),
This library also use JSON.stringify(app.images) I want without JSON, save as array
– Pavel
Mar 22 at 6:38
add a comment |
Looks like there is a package already made for this.
https://novapackages.com/packages/halimtuhu/array-images
Example usage ArrayImages::make('Images', 'images')->disk('public'),
This library also use JSON.stringify(app.images) I want without JSON, save as array
– Pavel
Mar 22 at 6:38
add a comment |
Looks like there is a package already made for this.
https://novapackages.com/packages/halimtuhu/array-images
Example usage ArrayImages::make('Images', 'images')->disk('public'),
Looks like there is a package already made for this.
https://novapackages.com/packages/halimtuhu/array-images
Example usage ArrayImages::make('Images', 'images')->disk('public'),
answered Mar 22 at 0:10
Matt CMatt C
52134
52134
This library also use JSON.stringify(app.images) I want without JSON, save as array
– Pavel
Mar 22 at 6:38
add a comment |
This library also use JSON.stringify(app.images) I want without JSON, save as array
– Pavel
Mar 22 at 6:38
This library also use JSON.stringify(app.images) I want without JSON, save as array
– Pavel
Mar 22 at 6:38
This library also use JSON.stringify(app.images) I want without JSON, save as array
– Pavel
Mar 22 at 6:38
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55288916%2flaravel-nova-save-array-in-custom-field%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Please try to reformulate your question. It's not clear what your problem is.
– StefanG
Mar 21 at 21:17