I would like to use the DB class of laravel to execute a mysql query but none of the functions provided by Laravel are working.
None of those is working: DB::statment()
Drop the users table from database then try this and let me know whether it works or not:
DB::insert('CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`u_username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`u_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`u_regdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`u_birthday` date NOT NULL DEFAULT '0000-00-00',
`u_lastlogin` int(11) NOT NULL,
`u_logcout` int(11) NOT NULL DEFAULT '0',
`u_level` tinyint(1) NOT NULL DEFAULT '0',
`u_language` tinyint(1) NOT NULL DEFAULT '0',
`u_status` tinyint(1) NOT NULL DEFAULT '0',
`u_gender` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci');
//and so on for all the other queries.