Skip to content
Discussion options

You must be logged in to vote

For now, I've done this

So,
BudgetCrudController.php

public function show($id)
    {
        //Define the child model 
        $model=BudgetItem::class;
       
        // Set $this->data with variables that used inside the view
        $this->data = $this->getTableInfo($model,$id);

        $content = $this->traitShow($id);

        return $content;
    }

in the same file above I have this

public function getTableInfo($model,$id)
    {
        $table=(new $model)->getTable();
        $columns = \DB::getSchemaBuilder()->getColumnListing($table);

        // Search 
        $sons_related = $model::where($this->crud->entity_name.'_id',$id)->get();
       
        // Organizar elementos  …

Replies: 0 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by karandatwani92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant