Skip to content

Create form with specific columns #469

Closed Answered by nasirkhan
markplus asked this question in Q&A
Discussion options

You must be logged in to vote

You have to add the following method in your controller

public function index_data()
    {
        $module_title = $this->module_title;
        $module_name = $this->module_name;
        $module_path = $this->module_path;
        $module_icon = $this->module_icon;
        $module_model = $this->module_model;
        $module_name_singular = Str::singular($module_name);

        $module_action = 'List';

        $page_heading = label_case($module_title);
        $title = $page_heading.' '.label_case($module_action);

        $$module_name = $module_model::select('id', 'name', 'updated_at');

        $data = $$module_name;

        return Datatables::of($$module_name)
            ->addColumn('…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@markplus
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by nasirkhan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants