I have a Model "PreExpedition.php" and in this model I upload the data to the database.
public static function createExpedition($region, $ship, $title, $days) {
$new = new PreExpedition;
$new->region_id = $region;
$new->ship_id = $ship;
$new->title = $title;
$new->days= $days;
$new->save();
}
I want to get the ID from the expedition i just uploaded and pass it to the controller. What would be the best way to do this? And how do i handle the result in the controller.
Thanks!