Working on Laravel 5 DB::transaction but throwing following error:
exception 'ErrorException' with message 'Undefined variable: tasks'
Here is my code:
private function addTasks($tasks, $id) {
DB::transaction(function() {
DB::table('task')->whereIn('id', $tasks)->update(array('task_parent_id' => $id));
});
}
I've checked every line of code but found nothing wrong, please let me know where did wrong?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2vnVKly
via IFTTT
Aucun commentaire:
Enregistrer un commentaire