Hello! Please advice me how to connect two tables within database - Company and Employees.
First, you create a Company profile and it create row in table - companies.
Secondly, you upload the employee.csv to the table - employees.
In employees table there is company_id which should be linked to the company's id in companies table, how to make it automatic?
For example, previously I set relations manually by the
$post->category_id = $request->input('category_id');
however, now I have no idea how to solve this.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community