MongolidLaravel\MongolidModel::firstOrNew PHP Method

firstOrNew() public static method

Gets the first entity of this kind that matches the query. If no document was found, a new entity will be returned with the _id field filled.
public static firstOrNew ( mixed $id ) : ActiveRecord
$id mixed Document id.
return Mongolid\ActiveRecord
    public static function firstOrNew($id)
    {
        return static::callMockOrParent('firstOrNew', func_get_args());
    }