Basically, I'm creating an Article instance:
$article = new Article();
//Returns null
$id = $article->id();
This however returns an empty object. What I would like to do is create an article and also get its id before doing:
$article->save();
Trying to create an article doesn't work, because it requires providing values or having default ones:
$article = Article::create();
The approach I'm thinking about is doing:
$latest_id = Article::latest()->first()->id;
But I'm not sure if it's the right one, or if there is a better method.