I'm trying to do simple insertion in database and im getting the following error
call_user_func_array() expects parameter 1 to be a valid callback, no array or string given
The insertion code look like this
DB::insert('insert into users (id, name) values (?, ?)', array(1, 'Dayle'));
It's a basic query for laravel, but it won't work why?
DB::table('users')->insert(array(1, 'Dayle'));insert uses an array for the values and you need to specify the table to do the insert on.