wikichua / simplecontrolpanel

Simple Control Panel (Admin Panel) for Laravel. (STILL Under Development)
MIT License
4 stars 2 forks source link

widgets help #9

Closed Khludev closed 4 years ago

Khludev commented 4 years ago

Hello Wiki Chua Tell me how to work with widgets..

wikichua commented 4 years ago

sorry was busy these days. will get back to u very soon. sorry about this

wikichua commented 4 years ago

btw, was thinking about the translation u added in. does it really making sense? i was half way working on this actually. lol.. but i saw the objective of ur making. to try to generate the pre translated wordings into the stubs. i was thinking to make it more generalize so the localization could be done on demand. what do u think? @Khludev

wikichua commented 4 years ago

image @ @Khludev sorry bout this. but wondering if u have this problem?

Khludev commented 4 years ago

image @ @Khludev sorry bout this. but wondering if u have this problem?

Hello. Everything works fine for me

Khludev commented 4 years ago

Выделение_014

btw, was thinking about the translation u added in. does it really making sense? i was half way working on this actually. lol.. but i saw the objective of ur making. to try to generate the pre translated wordings into the stubs. i was thinking to make it more generalize so the localization could be done on demand. what do u think? @Khludev

I also thought about localization on demand. But I already did 3 projects and for each I had to do translations. At first, I had the idea of ​​creating separate stubs templates in the folder (/resources/stubs/crud/default_trats..)/ But in the future, when changing the stubs of a file in the / crud / default folder, also change it in the / crud / default_trans folder, which time consuming.

If localization is not required, you do not need to copy the translation folder. It is only necessary to pass the __l ($ key, $ default_text) function as the second parameter to the default text.

Khludev commented 4 years ago

@wikichua What are your ideas for translations?

wikichua commented 4 years ago

i think ur solution should be works fine. just bit of tweak to allow change lang on demand. let figure out. as the widget. simply crud:widget. this will create a widget class in the app directory and also the widget blade according to ur config. crud:widget Tag for example. however there is no charts implemented as i thought this could be various and depend on developer. simplest is just throw in the table. to call and use it. simply @widget(ClassName). note there is not single or double quote in ClassName. so i just leave as it is.

Khludev commented 4 years ago

Thanks. @Widget(Menu) worked. I recently switched to Laravel from Codeigniter. Therefore, I do not know all the nuances so far.

wikichua commented 4 years ago

@Khludev no worries. appreciated ur participate. we learn together. actually there is alternative way, u will realize i don use npm in this project. in fact. most advise to use it so ur client scripts can be minified and much easier to manage, its like composer. but then, its fine, since this is admin panel.