Thank's but I need find the employee_id located on User model and get id of the row for insert on user_id field, this an example of my idea
public function store(Request $request)
{
$employee_id=$request->get('employee_id'); <- I tried this
$employee_id=$request->employee_id; <- And this but no results.
$user=User::where('employee_id','=','$employee_id')->get();
Workshop::create([
'status' => $request->get('status'),
'issue' => $request->get('issue'),
'vehicle_id' => $request->get('vehicle_id'),
'user_id' => $request->get($user->id)
]);
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community