sorry don't see this post, thanks for answer.
Bob
@Bob
Posts made by Bob
-
RE: what is value object when i create a new module?
-
RE: Unable to upload/save image
I don't know too how to trigger created event., but i try to understand how to edit function method work find in youtube, and after read function i write in my store function in controller admin
/** * Store a newly created resource in storage. * * @param Request $request * @return Response */ public function store(Request $request, FileRepository $FileRepository) { $entity = $this->testimonial->create($request->all()); $entity->files()->attach($request->medias_single['gallery'], [ 'imageable_type' => 'Modules\\Testimonials\\Entities\\Testimonial', 'zone' => 'gallery', ]); flash()->success(trans('core::core.messages.resource created', ['name' => trans('testimonials::testimonials.title.testimonials')])); return redirect()->route('admin.testimonials.testimonial.index'); }
It's work, now when i create a new testimonial, a new row is create in table media__imageables.
But i don't know if is a good way to do it. -
what is value object when i create a new module?
I try to create a new module with The module scaffolde find in https://asgardcms.com/docs/v1/workshop-module/module-scaffold, but in the last question he ask a 'value objects'.
I have no idea what is it, when, why, where we can use it? have you any exemple to help me to undrestand please?
-
Create new page
How i can't create a new page with a custom url ?
for exemple i want a new page to show any post by tag.
But if a create a new route, and controller and view i can't manage it in module page.
And if i create a page from module page i need to create as many page per tag, and if i have a new tag i need to create a new page, so it's not like a good idea.