Thameera
1 year ago

categorize the database table according to a field in database

Posted 1 year ago by Thameera

i want to categorize the table according to the title category so i use this query

$photos = $this->data->join('category', 'category.id', '=', 'training_module.title')
            ->where('training_module.status', 1)
            ->groupBy('training_module.type')
            ->orderBy('training_module.id', 'DESC')
            ->get();
``` but it shows single item from every category not all items in a category how  can we do that

Please sign in or create an account to participate in this conversation.