Store Helpers functions in mysql Table Undefined variable $employee_id

Viewed 18

I'm working on Laravel and I have functions in the helper. I want to store the functions in the data base (mirgation).

Ex function in the helper :

function PayrollSalary($employee_id, $employor_id)

I can't store the below line when I migrate the database. I have an error message (Undefined variable $employee_id).

DB::table('payroll_model_items')->insert(array(
  'code'=>"BaseSal", 
  'name'=>"Base Salary", 
  'value'=>"<div>{{PayrollSalary($employee_id, $employor_id)}}</div>",  
  'sequence'=>"0000101",
  'created_at'=>date('Y-m-d H:m:s'),
  'updated_at'=>date('Y-m-d H:m:s')
));

Can anyone help?

Thank you

0 Answers
Related