wikichua / simplecontrolpanel

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

crud.config.input.option from configuration file #3

Closed Khludev closed 5 years ago

Khludev commented 5 years ago

The task was to output data from the config file “config / backend.php” because the expression ( @foreach (['NOT_PUBLISHED', 'PUBLISHED', 'DRAFT'] as $ option) ) is not entirely correct in my case. Is it possible to write “config ('backend.status_publication')” in the config file of crud?

wikichua commented 5 years ago

my suggestion is using settings('status_publication') as in the panel, there is a system settings, where you can add array in it. but pls do AWARE, its only for single level of array.

image

wikichua commented 5 years ago

@Khludev alternative you may follow as per image. create your backend.php in config. then change the settings to config:status_publication it should be working as well image

Khludev commented 5 years ago

@Khludev alternative you may follow as per image. create your backend.php in config. then change the settings to config:status_publication it should be working as well image

In my case, I need “config ('backend.status_publication')” instead of “settings ('backend.status_publication')” Since settings ('backend.status_publication') is data from the database. And config ('backend.status_publication') is the data from the config file