@shiva It is working fine with me. Might be your database do not have any data matching to ur query?
@SachinAgarwal - I do have matching data.
Here is my tables My content table
CREATE TABLE IF NOT EXISTS `content` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`content` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=53 ;
--
-- Dumping data for table `content`
--
INSERT INTO `content` (`id`, `title`, `content`, `image`, `created_at`, `updated_at`) VALUES
(51, 'Home Title', '', '[]', '2015-03-16 18:01:37', '2015-03-16 18:01:37'),
(52, 'About us title', '', '[]', '2015-03-16 18:02:36', '2015-03-16 18:02:36');
My menus table
CREATE TABLE IF NOT EXISTS `menus` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`menu_id` int(10) unsigned NOT NULL,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=32 ;
--
-- Dumping data for table `menus`
--
INSERT INTO `menus` (`id`, `title`, `image`, `menu_id`, `created_at`, `updated_at`) VALUES
(30, 'Home', '[]', 0, '2015-03-16 17:59:20', '2015-03-16 17:59:20'),
(31, 'About Us', '[]', 0, '2015-03-16 18:00:20', '2015-03-16 18:00:20');
My content_menu table
CREATE TABLE IF NOT EXISTS `content_menu` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`content_id` int(10) NOT NULL,
`menu_id` int(10) NOT NULL,
`created_at` timestamp NOT NULL,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=26 ;
--
-- Dumping data for table `content_menu`
--
INSERT INTO `content_menu` (`id`, `content_id`, `menu_id`, `created_at`, `updated_at`) VALUES
(24, 51, 30, '0000-00-00 00:00:00', '2015-03-16 20:01:37'),
(25, 52, 31, '0000-00-00 00:00:00', '2015-03-16 20:02:36');
@SachinAgarwal - This might help, but I didn't think of it in the beginning but I'm using L4
Any Ideas?
@Shiva Honestly, I dont have any idea about L4, I started using Laravel since L5. :P
Anyone here know how to do what I need in L4?
You should start to achieve something simpler before trying to do this. You obviously not have the required basics to accomplish this. It is like explaining someone how to solve an equation when he don't know how to do a multiplication.
Erase everything, get back to the docs & laracasts series and try to improve your skills by small steps. No need to hurry.
Any ideas?
at the moment I can't take my time even though I would like to. These are the things I need to know now or else I would not have posted the question...
So that pretty much translates as:
ok I took on a job that I have no experience to complete, but some other suckers will do it for me and I can take payment
Not cool.
@sitesense - I never meant it to sound that way,
any clues?
Please or to participate in this conversation.