Hello Everyone
I want to show current inserted id from controller. This is my code
$comp = new Company;
$comp->name = Request::get('name');
$s=$comp->save();
$comp = new Company;
$comp->name = Request::get('name');
$comp->save();
$newId = $comp->id;
assuming the primary key is "id"
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community