Store Data in Multiple tables via single form
I want to store data in 3 tables via single registration
form but getting error. I have tried all the way but it is not
allowing due to primary key constraints violation
Controller
class UserController extends Controller
{
public function registerLawyer(Request $request){
$firstname = $request->get('firstname');
$lastname = $request->get('lastname');
$country = $request->get('country');
$role = $request->get('role');
$dob = $request->get('dob');
$email = $request->get('email');
$pass = $request->get('password');
$aop = $request->get('pracitces');
$licensenum = $request->get('licenseNumber');
$license = $request->get('license');
$data = new User();
$data->firstname = $firstname,
$data->lastname = $lastname,
$data->country = $country,
$data->role = $role,
$data->dob = $dob,
$data->email = $email,
$data->password = $pass,
$data->save();
DB::table('lawyer')->insert([
'practices' => $aop
]);
DB::table('license')->insert([
'licenseno' => $licensenum,
'institution' => $license
]);
return view('registerlawyer');
}
}
registerlawyer.blade.php
<form method="post">
<h1>Signup-Legal Professional</h1>
<input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
Enter Firstname :<input type="text" name="firstname" required><br>
Enter Lastname :<input type="text" name="lastname" required><br>
Country <select name="country" required="required" class="form-control">
<option value="select" selected="selected">Select Country</option>
<option value="Cameroon">Cameroon</option>
<option value="Canada">Canada</option>
<option value="Cape Verde">Cape Verde</option>
<option value="Cayman Islands">Cayman Islands</option>
<option value="Central African Republic">Central African Republic</option>
<option value="Chad">Chad</option>
<option value="Chile">Chile</option>
</select><br>
Enter Company :<input type="text" name="company" required><br>
Enter role :<input type="text" name="role" required><br>
Enter DOB :<input type="date" name="dob"><br>
Enter emailaddress :<input type="text" name="email" required><br>
Enter password :<input type="password" name="password" required><br>
Select Area Of practices <select name="pracitces">
<option>Individuals</option>
<option>Aerospace</option>
<option>Agriculture</option>
<option>Blockchain</option>
<option>Construction</option>
<option>Education</option>
<option>Electronics</option>
</select><br>
Enter License Number :<input type="number" name="licenseNumber" required><br>
Enter License Institution<input type="text" name="license" required><br>
<input type="submit" value="Submit">
</form>
The error I am getting is
SQLSTATE[HY000]: General error: 1364 Field 'u_id' doesn't have a default value (SQL: insert into `lawyer` (`practices`) values
(Construction))
How would I get the u_id when user is not even registered?
html database laravel-5.7
add a comment |
I want to store data in 3 tables via single registration
form but getting error. I have tried all the way but it is not
allowing due to primary key constraints violation
Controller
class UserController extends Controller
{
public function registerLawyer(Request $request){
$firstname = $request->get('firstname');
$lastname = $request->get('lastname');
$country = $request->get('country');
$role = $request->get('role');
$dob = $request->get('dob');
$email = $request->get('email');
$pass = $request->get('password');
$aop = $request->get('pracitces');
$licensenum = $request->get('licenseNumber');
$license = $request->get('license');
$data = new User();
$data->firstname = $firstname,
$data->lastname = $lastname,
$data->country = $country,
$data->role = $role,
$data->dob = $dob,
$data->email = $email,
$data->password = $pass,
$data->save();
DB::table('lawyer')->insert([
'practices' => $aop
]);
DB::table('license')->insert([
'licenseno' => $licensenum,
'institution' => $license
]);
return view('registerlawyer');
}
}
registerlawyer.blade.php
<form method="post">
<h1>Signup-Legal Professional</h1>
<input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
Enter Firstname :<input type="text" name="firstname" required><br>
Enter Lastname :<input type="text" name="lastname" required><br>
Country <select name="country" required="required" class="form-control">
<option value="select" selected="selected">Select Country</option>
<option value="Cameroon">Cameroon</option>
<option value="Canada">Canada</option>
<option value="Cape Verde">Cape Verde</option>
<option value="Cayman Islands">Cayman Islands</option>
<option value="Central African Republic">Central African Republic</option>
<option value="Chad">Chad</option>
<option value="Chile">Chile</option>
</select><br>
Enter Company :<input type="text" name="company" required><br>
Enter role :<input type="text" name="role" required><br>
Enter DOB :<input type="date" name="dob"><br>
Enter emailaddress :<input type="text" name="email" required><br>
Enter password :<input type="password" name="password" required><br>
Select Area Of practices <select name="pracitces">
<option>Individuals</option>
<option>Aerospace</option>
<option>Agriculture</option>
<option>Blockchain</option>
<option>Construction</option>
<option>Education</option>
<option>Electronics</option>
</select><br>
Enter License Number :<input type="number" name="licenseNumber" required><br>
Enter License Institution<input type="text" name="license" required><br>
<input type="submit" value="Submit">
</form>
The error I am getting is
SQLSTATE[HY000]: General error: 1364 Field 'u_id' doesn't have a default value (SQL: insert into `lawyer` (`practices`) values
(Construction))
How would I get the u_id when user is not even registered?
html database laravel-5.7
In lawyer table, u_id is foreign key?
– Bhoomi patel
Nov 21 '18 at 13:02
Yes and lawyer_id is a foreign key in license table
– Prathamesh Doke
Nov 21 '18 at 13:05
add a comment |
I want to store data in 3 tables via single registration
form but getting error. I have tried all the way but it is not
allowing due to primary key constraints violation
Controller
class UserController extends Controller
{
public function registerLawyer(Request $request){
$firstname = $request->get('firstname');
$lastname = $request->get('lastname');
$country = $request->get('country');
$role = $request->get('role');
$dob = $request->get('dob');
$email = $request->get('email');
$pass = $request->get('password');
$aop = $request->get('pracitces');
$licensenum = $request->get('licenseNumber');
$license = $request->get('license');
$data = new User();
$data->firstname = $firstname,
$data->lastname = $lastname,
$data->country = $country,
$data->role = $role,
$data->dob = $dob,
$data->email = $email,
$data->password = $pass,
$data->save();
DB::table('lawyer')->insert([
'practices' => $aop
]);
DB::table('license')->insert([
'licenseno' => $licensenum,
'institution' => $license
]);
return view('registerlawyer');
}
}
registerlawyer.blade.php
<form method="post">
<h1>Signup-Legal Professional</h1>
<input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
Enter Firstname :<input type="text" name="firstname" required><br>
Enter Lastname :<input type="text" name="lastname" required><br>
Country <select name="country" required="required" class="form-control">
<option value="select" selected="selected">Select Country</option>
<option value="Cameroon">Cameroon</option>
<option value="Canada">Canada</option>
<option value="Cape Verde">Cape Verde</option>
<option value="Cayman Islands">Cayman Islands</option>
<option value="Central African Republic">Central African Republic</option>
<option value="Chad">Chad</option>
<option value="Chile">Chile</option>
</select><br>
Enter Company :<input type="text" name="company" required><br>
Enter role :<input type="text" name="role" required><br>
Enter DOB :<input type="date" name="dob"><br>
Enter emailaddress :<input type="text" name="email" required><br>
Enter password :<input type="password" name="password" required><br>
Select Area Of practices <select name="pracitces">
<option>Individuals</option>
<option>Aerospace</option>
<option>Agriculture</option>
<option>Blockchain</option>
<option>Construction</option>
<option>Education</option>
<option>Electronics</option>
</select><br>
Enter License Number :<input type="number" name="licenseNumber" required><br>
Enter License Institution<input type="text" name="license" required><br>
<input type="submit" value="Submit">
</form>
The error I am getting is
SQLSTATE[HY000]: General error: 1364 Field 'u_id' doesn't have a default value (SQL: insert into `lawyer` (`practices`) values
(Construction))
How would I get the u_id when user is not even registered?
html database laravel-5.7
I want to store data in 3 tables via single registration
form but getting error. I have tried all the way but it is not
allowing due to primary key constraints violation
Controller
class UserController extends Controller
{
public function registerLawyer(Request $request){
$firstname = $request->get('firstname');
$lastname = $request->get('lastname');
$country = $request->get('country');
$role = $request->get('role');
$dob = $request->get('dob');
$email = $request->get('email');
$pass = $request->get('password');
$aop = $request->get('pracitces');
$licensenum = $request->get('licenseNumber');
$license = $request->get('license');
$data = new User();
$data->firstname = $firstname,
$data->lastname = $lastname,
$data->country = $country,
$data->role = $role,
$data->dob = $dob,
$data->email = $email,
$data->password = $pass,
$data->save();
DB::table('lawyer')->insert([
'practices' => $aop
]);
DB::table('license')->insert([
'licenseno' => $licensenum,
'institution' => $license
]);
return view('registerlawyer');
}
}
registerlawyer.blade.php
<form method="post">
<h1>Signup-Legal Professional</h1>
<input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
Enter Firstname :<input type="text" name="firstname" required><br>
Enter Lastname :<input type="text" name="lastname" required><br>
Country <select name="country" required="required" class="form-control">
<option value="select" selected="selected">Select Country</option>
<option value="Cameroon">Cameroon</option>
<option value="Canada">Canada</option>
<option value="Cape Verde">Cape Verde</option>
<option value="Cayman Islands">Cayman Islands</option>
<option value="Central African Republic">Central African Republic</option>
<option value="Chad">Chad</option>
<option value="Chile">Chile</option>
</select><br>
Enter Company :<input type="text" name="company" required><br>
Enter role :<input type="text" name="role" required><br>
Enter DOB :<input type="date" name="dob"><br>
Enter emailaddress :<input type="text" name="email" required><br>
Enter password :<input type="password" name="password" required><br>
Select Area Of practices <select name="pracitces">
<option>Individuals</option>
<option>Aerospace</option>
<option>Agriculture</option>
<option>Blockchain</option>
<option>Construction</option>
<option>Education</option>
<option>Electronics</option>
</select><br>
Enter License Number :<input type="number" name="licenseNumber" required><br>
Enter License Institution<input type="text" name="license" required><br>
<input type="submit" value="Submit">
</form>
The error I am getting is
SQLSTATE[HY000]: General error: 1364 Field 'u_id' doesn't have a default value (SQL: insert into `lawyer` (`practices`) values
(Construction))
How would I get the u_id when user is not even registered?
html database laravel-5.7
html database laravel-5.7
edited Jan 14 at 8:16
piet.t
10.1k73245
10.1k73245
asked Nov 21 '18 at 12:55


Prathamesh DokePrathamesh Doke
369120
369120
In lawyer table, u_id is foreign key?
– Bhoomi patel
Nov 21 '18 at 13:02
Yes and lawyer_id is a foreign key in license table
– Prathamesh Doke
Nov 21 '18 at 13:05
add a comment |
In lawyer table, u_id is foreign key?
– Bhoomi patel
Nov 21 '18 at 13:02
Yes and lawyer_id is a foreign key in license table
– Prathamesh Doke
Nov 21 '18 at 13:05
In lawyer table, u_id is foreign key?
– Bhoomi patel
Nov 21 '18 at 13:02
In lawyer table, u_id is foreign key?
– Bhoomi patel
Nov 21 '18 at 13:02
Yes and lawyer_id is a foreign key in license table
– Prathamesh Doke
Nov 21 '18 at 13:05
Yes and lawyer_id is a foreign key in license table
– Prathamesh Doke
Nov 21 '18 at 13:05
add a comment |
2 Answers
2
active
oldest
votes
Use This Code :
$user_data = DB::table('users')->insert([
'firstname' => $firstname,
'lastname' => $lastname,
'country' => $country,
'role' => $role,
'dob' => $dob,
'email' => $email,
'password' => $pass,
]);
$user = DB::table('users')->where(['firstname'=>$firstname])->first();
$lawyer_data = DB::table('lawyer')->insert([
'u_id' => $user->id,
'practices' => $aop
]);
$law = DB::table('lawyer')->where(['u_id'=>$user->id])->first(['id']);
$license_data = DB::table('license')->insert([
'lawyer_id' => $law->u_id,
'licenseno' => $licensenum,
'institution' => $license
]);
return redirect('welcome');
add a comment |
$user_data = DB::table('users')->insertGetId([
'firstname' => $firstname,
'lastname' => $lastname,
'country' => $country,
'role' => $role,
'dob' => $dob,
'email' => $email,
'password' => $pass,
]);
$lawyer_data = DB::table('lawyer')->insertGetId([
'u_id' => $user_data,
'practices' => $aop,
]);
$license_data = DB::table('license')->insertGetId([
'lawyer_id' => $lawyer_data,
'licenseno' => $licensenum,
'institution' => $license,
]);
Trying to get property 'id' of non-object this error occurred.
– Prathamesh Doke
Nov 21 '18 at 13:11
In which line this error occurred?
– Bhoomi patel
Nov 21 '18 at 13:15
In lawyer_data-> user_data=>id and same on license_data
– Prathamesh Doke
Nov 21 '18 at 13:20
its work for me... but try this updated code..
– Bhoomi patel
Nov 21 '18 at 13:29
2
it wont work @Bhoomipatel cause it will just show True cause data only stores in Database
– Ashish
Nov 21 '18 at 13:29
|
show 8 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53412507%2fstore-data-in-multiple-tables-via-single-form%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use This Code :
$user_data = DB::table('users')->insert([
'firstname' => $firstname,
'lastname' => $lastname,
'country' => $country,
'role' => $role,
'dob' => $dob,
'email' => $email,
'password' => $pass,
]);
$user = DB::table('users')->where(['firstname'=>$firstname])->first();
$lawyer_data = DB::table('lawyer')->insert([
'u_id' => $user->id,
'practices' => $aop
]);
$law = DB::table('lawyer')->where(['u_id'=>$user->id])->first(['id']);
$license_data = DB::table('license')->insert([
'lawyer_id' => $law->u_id,
'licenseno' => $licensenum,
'institution' => $license
]);
return redirect('welcome');
add a comment |
Use This Code :
$user_data = DB::table('users')->insert([
'firstname' => $firstname,
'lastname' => $lastname,
'country' => $country,
'role' => $role,
'dob' => $dob,
'email' => $email,
'password' => $pass,
]);
$user = DB::table('users')->where(['firstname'=>$firstname])->first();
$lawyer_data = DB::table('lawyer')->insert([
'u_id' => $user->id,
'practices' => $aop
]);
$law = DB::table('lawyer')->where(['u_id'=>$user->id])->first(['id']);
$license_data = DB::table('license')->insert([
'lawyer_id' => $law->u_id,
'licenseno' => $licensenum,
'institution' => $license
]);
return redirect('welcome');
add a comment |
Use This Code :
$user_data = DB::table('users')->insert([
'firstname' => $firstname,
'lastname' => $lastname,
'country' => $country,
'role' => $role,
'dob' => $dob,
'email' => $email,
'password' => $pass,
]);
$user = DB::table('users')->where(['firstname'=>$firstname])->first();
$lawyer_data = DB::table('lawyer')->insert([
'u_id' => $user->id,
'practices' => $aop
]);
$law = DB::table('lawyer')->where(['u_id'=>$user->id])->first(['id']);
$license_data = DB::table('license')->insert([
'lawyer_id' => $law->u_id,
'licenseno' => $licensenum,
'institution' => $license
]);
return redirect('welcome');
Use This Code :
$user_data = DB::table('users')->insert([
'firstname' => $firstname,
'lastname' => $lastname,
'country' => $country,
'role' => $role,
'dob' => $dob,
'email' => $email,
'password' => $pass,
]);
$user = DB::table('users')->where(['firstname'=>$firstname])->first();
$lawyer_data = DB::table('lawyer')->insert([
'u_id' => $user->id,
'practices' => $aop
]);
$law = DB::table('lawyer')->where(['u_id'=>$user->id])->first(['id']);
$license_data = DB::table('license')->insert([
'lawyer_id' => $law->u_id,
'licenseno' => $licensenum,
'institution' => $license
]);
return redirect('welcome');
edited Nov 22 '18 at 9:17


Prathamesh Doke
369120
369120
answered Nov 22 '18 at 9:14
AshishAshish
588219
588219
add a comment |
add a comment |
$user_data = DB::table('users')->insertGetId([
'firstname' => $firstname,
'lastname' => $lastname,
'country' => $country,
'role' => $role,
'dob' => $dob,
'email' => $email,
'password' => $pass,
]);
$lawyer_data = DB::table('lawyer')->insertGetId([
'u_id' => $user_data,
'practices' => $aop,
]);
$license_data = DB::table('license')->insertGetId([
'lawyer_id' => $lawyer_data,
'licenseno' => $licensenum,
'institution' => $license,
]);
Trying to get property 'id' of non-object this error occurred.
– Prathamesh Doke
Nov 21 '18 at 13:11
In which line this error occurred?
– Bhoomi patel
Nov 21 '18 at 13:15
In lawyer_data-> user_data=>id and same on license_data
– Prathamesh Doke
Nov 21 '18 at 13:20
its work for me... but try this updated code..
– Bhoomi patel
Nov 21 '18 at 13:29
2
it wont work @Bhoomipatel cause it will just show True cause data only stores in Database
– Ashish
Nov 21 '18 at 13:29
|
show 8 more comments
$user_data = DB::table('users')->insertGetId([
'firstname' => $firstname,
'lastname' => $lastname,
'country' => $country,
'role' => $role,
'dob' => $dob,
'email' => $email,
'password' => $pass,
]);
$lawyer_data = DB::table('lawyer')->insertGetId([
'u_id' => $user_data,
'practices' => $aop,
]);
$license_data = DB::table('license')->insertGetId([
'lawyer_id' => $lawyer_data,
'licenseno' => $licensenum,
'institution' => $license,
]);
Trying to get property 'id' of non-object this error occurred.
– Prathamesh Doke
Nov 21 '18 at 13:11
In which line this error occurred?
– Bhoomi patel
Nov 21 '18 at 13:15
In lawyer_data-> user_data=>id and same on license_data
– Prathamesh Doke
Nov 21 '18 at 13:20
its work for me... but try this updated code..
– Bhoomi patel
Nov 21 '18 at 13:29
2
it wont work @Bhoomipatel cause it will just show True cause data only stores in Database
– Ashish
Nov 21 '18 at 13:29
|
show 8 more comments
$user_data = DB::table('users')->insertGetId([
'firstname' => $firstname,
'lastname' => $lastname,
'country' => $country,
'role' => $role,
'dob' => $dob,
'email' => $email,
'password' => $pass,
]);
$lawyer_data = DB::table('lawyer')->insertGetId([
'u_id' => $user_data,
'practices' => $aop,
]);
$license_data = DB::table('license')->insertGetId([
'lawyer_id' => $lawyer_data,
'licenseno' => $licensenum,
'institution' => $license,
]);
$user_data = DB::table('users')->insertGetId([
'firstname' => $firstname,
'lastname' => $lastname,
'country' => $country,
'role' => $role,
'dob' => $dob,
'email' => $email,
'password' => $pass,
]);
$lawyer_data = DB::table('lawyer')->insertGetId([
'u_id' => $user_data,
'practices' => $aop,
]);
$license_data = DB::table('license')->insertGetId([
'lawyer_id' => $lawyer_data,
'licenseno' => $licensenum,
'institution' => $license,
]);
edited Nov 22 '18 at 6:25
answered Nov 21 '18 at 13:07
Bhoomi patelBhoomi patel
486218
486218
Trying to get property 'id' of non-object this error occurred.
– Prathamesh Doke
Nov 21 '18 at 13:11
In which line this error occurred?
– Bhoomi patel
Nov 21 '18 at 13:15
In lawyer_data-> user_data=>id and same on license_data
– Prathamesh Doke
Nov 21 '18 at 13:20
its work for me... but try this updated code..
– Bhoomi patel
Nov 21 '18 at 13:29
2
it wont work @Bhoomipatel cause it will just show True cause data only stores in Database
– Ashish
Nov 21 '18 at 13:29
|
show 8 more comments
Trying to get property 'id' of non-object this error occurred.
– Prathamesh Doke
Nov 21 '18 at 13:11
In which line this error occurred?
– Bhoomi patel
Nov 21 '18 at 13:15
In lawyer_data-> user_data=>id and same on license_data
– Prathamesh Doke
Nov 21 '18 at 13:20
its work for me... but try this updated code..
– Bhoomi patel
Nov 21 '18 at 13:29
2
it wont work @Bhoomipatel cause it will just show True cause data only stores in Database
– Ashish
Nov 21 '18 at 13:29
Trying to get property 'id' of non-object this error occurred.
– Prathamesh Doke
Nov 21 '18 at 13:11
Trying to get property 'id' of non-object this error occurred.
– Prathamesh Doke
Nov 21 '18 at 13:11
In which line this error occurred?
– Bhoomi patel
Nov 21 '18 at 13:15
In which line this error occurred?
– Bhoomi patel
Nov 21 '18 at 13:15
In lawyer_data-> user_data=>id and same on license_data
– Prathamesh Doke
Nov 21 '18 at 13:20
In lawyer_data-> user_data=>id and same on license_data
– Prathamesh Doke
Nov 21 '18 at 13:20
its work for me... but try this updated code..
– Bhoomi patel
Nov 21 '18 at 13:29
its work for me... but try this updated code..
– Bhoomi patel
Nov 21 '18 at 13:29
2
2
it wont work @Bhoomipatel cause it will just show True cause data only stores in Database
– Ashish
Nov 21 '18 at 13:29
it wont work @Bhoomipatel cause it will just show True cause data only stores in Database
– Ashish
Nov 21 '18 at 13:29
|
show 8 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53412507%2fstore-data-in-multiple-tables-via-single-form%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
In lawyer table, u_id is foreign key?
– Bhoomi patel
Nov 21 '18 at 13:02
Yes and lawyer_id is a foreign key in license table
– Prathamesh Doke
Nov 21 '18 at 13:05